alt+F11 进入vba界面,F5运行macro后报错。

Sub 合并当前工作簿下的所有工作表()
Application.ScreenUpdating = False
For j = 1 To Sheets.Count
If Sheets(j).Name <> ActiveSheet.Name Then
X = Range("A65536").End(xlUp).Row + 1
Sheets(j).UsedRange.Copy Cells(X, 1)
End If
Next
Range("B1").Select
Application.ScreenUpdating = True
MsgBox "当前工作簿下的全部工作表已经合并完毕!", vbInformation, "ATTENTION!"
End Sub

error: the macros in this project are disabled, please refer to the online help or documentation of the host application to determine how to enable macros.

Solution 1: 检查安全中心的设置。

Enable VBA macros is "checked".

Solution 2:

看看macro书不是创建在了正确的Excel object下,有时候打开太多excel。默认按ALT+F11会在其他excel object下创建macro。

在对应的object下创建新的module,然后输入代码。Function + F5运行。成功!

Excel error - the macros in this project are disabled, please refer to the online help or documentation of the host application to determine how to enable macros.的更多相关文章

  1. [转]How to enable macros in Excel 2016, 2013, and 2010

    本文转自:https://www.ablebits.com/office-addins-blog/2014/07/22/enable-macros-excel/#always-run-macros T ...

  2. Eclipse无法启动报An internal error occurred during: "reload maven project". java.lang.NullPointerException

    由于没有正常关机导致eclipse无法将数据正常写入配置文件导致无法启动.报这样一个异常 An internal error occurred during: "reload maven p ...

  3. ERROR: Cannot change version of project facet Dynamic Web Module to 3.0?

    Issue: When you create web app in eclipse with maven configuration, you may get following error. Can ...

  4. 解决 React-Native mac 运行报错 error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

    React-Native 开发的项目,Android 方面没有任何问题,IOS 就是无法跑起来,报错信息如下: mac 10.14.4 xcode 10.2.1 error Failed to bui ...

  5. error MSB8031: Building an MFC project for a non-Unicode character set is deprecated

    vs2013编译VC++源码,错误: error MSB8031: Building an MFC project for a non-Unicode character set is depreca ...

  6. error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library. See http://go.microsoft.co

    Win10,也重新装了免费版的Visual Studio 2013 y,写MFC程序时候发现这样的提示: error MSB8031: Building an MFC project for a no ...

  7. 关于Error:Maven Resources Compiler: Maven project configuration required for module '项目名' isn't available. Compilation of Maven projects is supported only&

    总是出现Error:Maven Resources Compiler: Maven project configuration required for module '项目名' isn't avai ...

  8. (转)新建maven项目时报错Error:Maven Resources Compiler: Maven project configuration required for module 'XX'解决方法

    转载地址:https://blog.csdn.net/qq784515681/article/details/85070195 在新建maven项目时,Problems中报错: Error:Maven ...

  9. eclipse不能启动,An internal error occurred during: "reload maven project".

    An internal error occurred during: "reload maven project". 这个错误是因为项目已经关闭,导致 导致此问题的原因是Sprin ...

  10. An internal error occurred during: “Updating Maven Project”. Unsupported IClasspathEntry kind=4解决办法

    An internal error occurred during: "Updating Maven Project". Unsupported IClasspathEntry k ...

随机推荐

  1. IntelliJ IDEA 程序运行的控制台乱码

    参考:https://blog.csdn.net/zp357252539/article/details/124614007 上方导航栏"Run→Edit Configurations-&q ...

  2. python之定时任务APScheduler

    一.APScheduler APScheduler全称Advanced Python Scheduler 作用为在指定的时间规则执行指定的作业. 指定时间规则的方式可以是间隔多久执行,可以是指定日期时 ...

  3. lg9019题解

    容易发现,向左跳是不优的. 而且除了最后一次跳跃,每次跳跃一定跳到现在能够跳到的最右的区间. 设\(r_i\)表示第\(i\)个区间能够跳到的最右的区间,\(l_i\)表示第\(i\)个区间能够跳到的 ...

  4. JDK8在xp安装办法

    jdk默认不支持xp,用到了后来的api,直接没法安装. 具体安装步骤: 1.用7-zip打开jdk8的版本8u231之前的版本. 2.导航到 .rsrc\1033\JAVA_CAB10\111把里面 ...

  5. 两张表合并到一个VO里面

    @Overridepublic List<TbRemouldAirELe> findAll() { List<TbRemouldAirELe> list = new Array ...

  6. 时间序列分析 2.X 单位根检验

    单位根检验 (基于模型检验序列是否平稳) 趋势平稳序列 \(X_{t}=\beta_{0}+\beta_{1} t+Y_{t}\) \(Y_t\) 为平稳序列, 则称 \(X_t\) 为趋势平稳序列 ...

  7. C++容器map、unordered_map、set、unordered_set的区别

    1.map: 底层由红黑树实现. Key在红黑树中有序排列,对红黑树进行中序遍历即可得到Key从小到大的排序序列. 使用map可在O(1)的时间复杂度下快速查找到Key. 2.unordered_ma ...

  8. C++ 中的匿名函数(lambda表达式)

    问题引入 使用std::sort函数对自定义类型排序时,我们需要传入一个比较函数作为参数.该比较函数只需要使用一次,但占有一个全局命名域中的名字,而且非常短,短到不需要名字就知道它的作用.这很浪费命名 ...

  9. kubernetes service服务发现两种方式

    service服务发现ClusterIP方式 1.暴露deployment服务 kubectl expose deployment nginx4 --port=8000 --target-port=8 ...

  10. apollo源码同时兼容mysql、postgresql、oracle解决思路

    本文摘录 apollo源码采用的是jpa规范 Hibernate 进行持久化的ORM框架 解决思路: 思路一:使用jpa配置文件persistence.xml文件,根据使用的数据库动态加载实体类与数据 ...