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.
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.的更多相关文章
- [转]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 ...
- Eclipse无法启动报An internal error occurred during: "reload maven project". java.lang.NullPointerException
由于没有正常关机导致eclipse无法将数据正常写入配置文件导致无法启动.报这样一个异常 An internal error occurred during: "reload maven p ...
- 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 ...
- 解决 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 ...
- 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 ...
- 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 ...
- 关于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 ...
- (转)新建maven项目时报错Error:Maven Resources Compiler: Maven project configuration required for module 'XX'解决方法
转载地址:https://blog.csdn.net/qq784515681/article/details/85070195 在新建maven项目时,Problems中报错: Error:Maven ...
- eclipse不能启动,An internal error occurred during: "reload maven project".
An internal error occurred during: "reload maven project". 这个错误是因为项目已经关闭,导致 导致此问题的原因是Sprin ...
- An internal error occurred during: “Updating Maven Project”. Unsupported IClasspathEntry kind=4解决办法
An internal error occurred during: "Updating Maven Project". Unsupported IClasspathEntry k ...
随机推荐
- Intellij IDEA 通过数据库表生成带注解的实体类Generate MyPOJOs.groovy脚本的编写
//两段代码第一个是mybatis-plus的 第二个spring-jpa的,jpa的是我复制别人的,是本体,mybatis的是我改的//idea连接数据方法见 https://www.cnblogs ...
- DesignPatternPrinciple-设计模式原则
1. 单一职责原则(Single Responsibility Principle)类T负责两个不同的职责:职责P1,职责P2. using System; using System.Collecti ...
- WeNet调试
运行: 参照:markdown 问题: CMake Error: Error: generator : Ninja Ninja:提高构建速度 wenet/runtime/libtorch/fc_bas ...
- 四大组件之内容提容者ContentProvider
参考:Android开发基础之内容提容者ContentProvider Android四大组件 内容提供者是四大组件之一,还记得Android的四大组件吗? 前面我们学习了三大组件了,对吧! 其中有: ...
- Oracle 详细-创建用户并导入sql文件
0.基本信息查询SQL select * from dba_users; 查看数据库里面所有用户,前提是你是有dba权限的帐号,如sys,system select * from all_u ...
- Django的反向解析
Django的请求生命周期是指用户在浏览器访问网页时,Django根据网址在路由列表里查找相应的路由,在从路由里找到视图函数或视图类进行处理,将处理结果作为相应内容返回浏览器并生成网页内容. 这个生命 ...
- 【27期】Dubbo面试八连问,这些你都能答上来吗?
1.Dubbo是什么? Dubbo是阿里巴巴开源的基于 Java 的高性能 RPC 分布式服务框架,现已成为 Apache 基金会孵化项目.致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA ...
- 2023 2 4 c++NOIP机试 小豫豫在郑州 type
1 #include <iostream> 2 #include <string> 3 using namespace std; 4 int j(string str){ 5 ...
- ps 合并两张图片为一张
打开PS并点击左上角的"文件":之后再点击"打开"(也可以按下快捷键"Ctrl+O"),打开文件选择窗口. 2 在打开的文件选择窗口中,找到 ...
- 简单的自动清理TIM/QQ聊天垃圾文件方案
我平时喜欢在后台挂着Tim,时间一长,我发现数据文件夹会越来越大,即使我没有看过这些消息(多为群聊消息),为了不再惦记清理垃圾文件,我整理了以下方案,可以每天清理一次7天前的文件. 1. 在磁盘任意位 ...