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. Mars3D与第三方集成

    1. 引言 Mars3D是基于Cesium的Web端的三维GIS库,对Cesium做了进一步封装和扩展 Mars3D官网:Mars3D三维可视化平台 | 火星科技 Mars3D开发手册:开发教程 - ...

  2. LeetCode-41 缺失的第一个正整数

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/first-missing-positive 题目描述 给你一个未排序的整数数组 nums ,请你 ...

  3. 负载均衡做集群时关于的session不均衡的解决方案

    从用户端来解释,就是当一个用户第一次访问被负载均衡代理到后端服务器A并登录后,服务器A上保留了用户的登录信息:当用户再次发送请求时, 根据负载均衡策略可能被代理到后端不同的服务器,例如服务器B,由于这 ...

  4. redis运维与管理

    redis内存存储,速度极快 丰富的附件功能 1.持久化功能:降存储在内存的数据保存到硬盘 2.发布与订阅:将消息同时分发给多个客户端 3.过期键功能:为键设置一个过期时间,让它在指定的时间之后自动被 ...

  5. P1046 [NOIP2005 普及组] 陶陶摘苹果

    题目描述 陶陶家的院子里有一棵苹果树,每到秋天树上就会结出 10 个苹果.苹果成熟的时候,陶陶就会跑去摘苹果.陶陶有个 30厘米高的板凳,当她不能直接用手摘到苹果的时候,就会踩到板凳上再试试. 现在已 ...

  6. vue3 h函数

    1. 自定义指令(withDirectives 仅可在setup或render函数中使用)可以使用 withDirectives 将自定义指令应用于 VNode: const { h, resolve ...

  7. JAVA 【SM2】加密解密

    JAVA [SM2]加密解密 前言:最近项目中必须用到SM2的加密解密 引入的Maven依赖 <dependency> <groupId>cn.hutool</group ...

  8. GPS北斗卫星时钟同步系统提升电信支撑网性能

    GPS北斗卫星时钟同步系统提升电信支撑网性能 京准科技提供参考--更多资料VX(ahjzsz) 各项新的数据业务,如电子商务.多媒体通信.IP电话等都是电信业务发展的新增长点,而传统业务也存在多家企业 ...

  9. Asp.net中web.config配置文件最全面详解 (转载至CSDN)

    转载至csdn链接如下 https://blog.csdn.net/u011966339/article/details/64905062 web.config是一个XML文件,用来储存Asp.net ...

  10. WebSocket 基本使用

    1. 引入 WebSocket 包 2. 2.最后测试 WebSocket 谷歌浏览器 F12 ,在 Console 控制台 输入以下测试链接,然后回车测试. ws = new WebSocket() ...