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. 优化 Win11 资源管理器打开文件夹速度

    打开"高级系统设置",点击"性能"设置,性能选项中勾选如上图选中的项,可以一定程度上提升 Win11 资源管理器打开文件夹的速度: "窗口内动画控件和 ...

  2. Word 段落首行缩进

    描述 使 Word 段落第一行左突出两个字符的位置,即段落首行缩进的方式有两种. "视图"选项卡--"显示"组--标尺 "开始"选项卡--& ...

  3. LeetCode-2043 两数相加题解

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/simple-bank-system 题目描述 你的任务是为一个很受欢迎的银行设计一款程序,以自动 ...

  4. 五子棋 framebuffer版

    要在家目录下 makefile 1 main : main.o fun.o input.o fb_draw.o 2 gcc -Wall -o $@ $^ 3 clean : 4 rm -rf *.o ...

  5. node.js 中删除,修改等接口

    1.首先是引入模块.闯将服务器,设置路由等 二.查询员工接口 三.添加员工接口 四.删除员工接口 五.修改员工接口

  6. 微信轰炸Python脚本

    1 import time 2 3 from pynput.keyboard import Key,Controller 4 5 keyboard = Controller() 6 7 a = inp ...

  7. Intellij IDEA 通过数据库表生成带注解的实体类Generate MyPOJOs.groovy脚本的编写

    //两段代码第一个是mybatis-plus的 第二个spring-jpa的,jpa的是我复制别人的,是本体,mybatis的是我改的//idea连接数据方法见 https://www.cnblogs ...

  8. css3的的新特性

    1.transform 2.calc 3.transition

  9. docker tar包下载地址

    https://download.docker.com/linux/static/stable/x86_64/

  10. textfsm

    from concurrent.futures import ThreadPoolExecutor import netmiko import os from threading import Loc ...