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 ...
随机推荐
- python编写程序练习-车牌摇号程序
import random import string count = 0 #设定计数器 car_numbers = [] # 创建一个列表,用来接收生产的车牌号池 while coun ...
- 【C++复习】运算符重载中的特殊运算符
无法被重载 类属关系运算符 . 成员指针运算符 .* 作用域分辨符 :: 三目运算符 ?: 只能通过成员函数重载 赋值运算符= 方括号[] 圆括号() 指向结构体成员运算符->
- AtCoder随做
突然发现只有我没写过 AT. 没写题解不意味着没做,有的忘了写或者太草率了就算了. 部分前言删了. 目录 ABC020D ABC241G ABC268 AGC003D AGC004D AGC004E ...
- Java后台校验手机号和邮箱
//true是手机号,false不是手机号 public static boolean checkPhone(String phone){ Pattern p = Pattern.compile(&q ...
- HttpClient Post 提交表单数据
运行环境 .net 4.6.1 //为防止因HTTPS证书认证失败造成API调用失败,需要先忽略证书信任问题 var sslHandler = new HttpClientHandler() { }; ...
- 用js实现元素两个元素位置对齐
一.问题描述 使得填表单位那一行字与下面的表格左对齐,对表格使用css中的margin:auto实现了居中,但是对那一行字(用div包裹的)使用margin:auto不生效:并且2021年下面对应的月 ...
- allure标题样式错乱处理
今天使用allure生成测试报告,感觉标题很不美观,查阅资料使用以下方法解决 不美观的报告标题: 解决方法: 找到这个py文件,小改源码 就是把这个方法直接返回空列表即可 修改后展示: 结束!下班!
- uwsgi部署flask,flask_apscheduler任务遇到各种问题解决
背景:最近在做的全域事件项目,快要靠近尾声了,需要用到uwsgi部署至生产环境,由于之前是debug模式,运行项目也是通过命令 python manager.py runserver (manage是 ...
- Win+R 常用命令
regedit 系统注册表编辑器 osk 打开键盘 msconfig 关闭系统开机启动项 gpedit.msc 本地组策略编辑器 nslookup IP地址侦测器 explorer 打开资源管理器 ...
- Mysql -七种Join