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. Django中多数据库的配置,实现分库分表,主从复制,读写分离

    在django项目中, 一个工程中存在多个APP应用很常见. 有时候希望不同的APP连接不同的数据库,这个时候需要建立多个数据库连接. 1. 修改项目的 settings 配置 在 settings. ...

  2. PO/PI

    典型集成场景 PI总体架构 消息映射 General Concepts(通用概念) 映射编辑器 元素 分配源/目标消息类型 有3种消息类型可分配给消息映射 1.使用已经存在于IR中的对象(比如消息类型 ...

  3. npm报错最好的办法就是删掉依赖然后重装

    之前有个node工程,现在要新增antd主题,那得增加安装 craco 并修改 package.json 里的 scripts 属性 改吧改,安装一直报错: Cannot find module 'w ...

  4. vue项目去掉网页滚动条

    点击查看代码 <template> <div id="app"> <router-view /> </div> </templ ...

  5. 蓝牙mesh组网实践(配网方式的选择)

    目录 本测试基于CH582m单片机,尝试进行简单的组网. 沁恒官方EVT中提供了两种配网方式--配网器配网和自配网. ①配网器配网:用一个设备(一块582开发板)作为配网器,也就是沁恒蓝牙mesh软件 ...

  6. 《CSOL大灾变》Mobile开发记录——武器音效部分

    在前端时间开发了武器系统的大部分逻辑,从武器购买界面,武器购买逻辑到游戏逻辑(拾起和丢弃武器)等都开发得差不多了.剩下的仅仅只是增加武器数据(模型,动画和音效,特效等等),然后用统一脚本逻辑定义载入游 ...

  7. SDN之Openflow+OpenDayLight课程开课通知

    内容简介: 该课程为期2天,在这两天里 我们将会深入体会SDN的特点与传统网络的区别 ,掌握SDN架构里各层的协议用途,Openflow作为sdn里的一款开源的南向协议,最大的意义体现在它实现了网络设 ...

  8. Python 切片/列表/字符串之间装换

    1. 怎么实现字符串变为list 使用split(),把字符串拆分再存入数组: 例子 input="ni si shi" output=input.split(" &qu ...

  9. docker-swarm轻量集群

    使用docker swarm搭建docker轻量集群服务 当前流行的k8s集群搭建无疑是很好的docker集群管理服务,但是对于像我这种仅自己学习的玩家有些过于重量,所以今天使用docker自带的do ...

  10. SDN第三次实验

    实验3:OpenFlow协议分析实践 实验目的 能够运用 wireshark 对 OpenFlow 协议数据交互过程进行抓包: 能够借助包解析工具,分析与解释 OpenFlow协议的数据包交互过程与机 ...