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 ...
随机推荐
- OpenLayers与百度高德等常见地图坐标系
1. OpenLayers坐标系 OpenLayers中,创建一个Map,默认的显示(View)的投影坐标系是EPSG:3857,常见的另一个坐标系是 EPSG:4326 参考官方API文档:Open ...
- 人工智能,丹青圣手,全平台(原生/Docker)构建Stable-Diffusion-Webui的AI绘画库教程(Python3.10/Pytorch1.13.0)
世间无限丹青手,遇上AI画不成.最近一段时间,可能所有人类画师都得发出一句"既生瑜,何生亮"的感叹,因为AI 绘画通用算法Stable Diffusion已然超神,无需美术基础,也 ...
- vue2+ts 设计一个扑克牌比大小的游戏
首先
- 红米手机刷 LineageOS (实操)
参考:https://miuiver.com/how-to-flash-lineageos/ 实操机型:红米note8 1. 下载Android Platform-Tools 2. 下载对应机型的TW ...
- .NET6+WebApi+Vue 前后端分离后台管理系统(一)
概述 项目是用的 NET6 webapi搭建一个前后端分离的后端管理框架,项目分为:表示层.业务层.数据访问层.数据存储层. Common:公共组件层,存放一些公共的方法.Model:实体Model数 ...
- 1137. 第 N 个泰波那契数 (Easy)
问题描述 1137. 第 N 个泰波那契数 (Easy) 泰波那契序列 T 定义如下: T = 0, T = 1, T = 1, 且在 n >= 0 的条件下 T = T + T + T 给你整 ...
- 面向对象基础之基础—控制台C#模拟银行ATM存取操作实例
c#控制台应用程序ATM银行操作实例.主要介绍了设计的方法:使用的类介绍:具体的运行界面:程序代码.代码直接写在一起放在Programm.cs中,拷贝可直接运行. 一.设计 1.原则上采用三层:(1) ...
- Vue基础之v-if与v-show
Show Time! 说再多不如直接上效果: (一)v-if <div id="app"> <div v-if="flag" class=&q ...
- [jQuery]判断页面是否滚动到底部
方法1:判断可见高度+滚动高度是否等于内容高度 但经过测试UC.QQ.华为浏览器,这个方法不生效.(打印查因:可能由于屏幕缩放,可见高度和滚动高度会偏小. $(this).scroll(functio ...
- 使用svg让页面自适应浏览器大小,整体等比缩放
网页代码: <!DOCTYPE html> <html> <head> <style> body { margin:0; padding:0; widt ...