本文转自:https://wellsr.com/vba/2015/excel/run-macro-without-opening-excel-using-vbscript/

Have you ever wanted to run an Excel Macro without actually opening Excel? Follow this tutorial to learn how you can make that happen with VBScript.

Example

Run Macro from Outside Excel

'Code should be placed in a .vbs file
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'C:\Users\Ryan\Desktop\Sales.xlsm'!SalesModule.SalesTotal"
objExcel.DisplayAlerts = False
objExcel.Application.Quit
Set objExcel = Nothing

Write better macros in half the time
I see people struggling with Excel every day and I want to help. That's why I'm giving away my personal macro library for free. This powerful gift lets you automatically import all my macros directly into your spreadsheet with just one click.

[转]Introduction - Run Excel Macro using VBScript的更多相关文章

  1. xlwings: Write Excel macro using python instead of VBA

    i want to write Excel macros to deal with the data, but i am not familiar with VBA language. so i de ...

  2. Use excel Macro export data from database

    Sub DownLoadMacro() '定义过程名称 Dim i As Integer, j As Integer, sht As Worksheet 'i,j为整数变量:sht 为excel工作表 ...

  3. 在Qt中用QAxObject来操作Excel

        目录(?)[+]   下一篇:用dumpcpp工具生成的excel.h/excel.cpp来操纵Excel 最近写程序中需要将数据输出保存到Excel文件中.翻看<C++ GUI Pro ...

  4. Excel 2007 若干技巧。

    1.自定义序列 office按钮→excel选项→常用→编辑自定义列表 2.无法清空剪贴板错误的处理办法: 取消"显示粘贴选项"选项 3.每次选定同一单元格 输入后按ctrl+En ...

  5. XML Publiser For Excel Template

    1.XML Publisher定义数据 2.XML Publisher定义模板 模板类型选择Microsoft Excel,默认输出类型选择Excel,上传.xls模板 3.定义并发程序 4.定义请求 ...

  6. [转]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 ...

  7. VBScript - 动态 Array 实现方法大全!

    记录一些方法,关于 VBScript 中,动态 Array 的实现 ,也适用于 VBA, 很久以前,写 VBA 的时候,就觉得使用 Array 很不方便,因为大小固定, 当时想的是,要是 Array ...

  8. 重新定位Excel Addin插件的方法

    Excel Add-in - How to automate installation Thursday, 20 October 2011 Automatic Approach ​The best w ...

  9. Oracle PLSQL读取(解析)Excel文档

    http://www.itpub.net/thread-1921612-1-1.html !!!https://code.google.com/p/plsql-utils/ Introduction介 ...

随机推荐

  1. 办公达人私藏的EXCEL辅助工具,一人抵十人,高效办公就靠它了!

    有很多小伙伴在日常工作中都离不开EXCEL的使用,但EXCEL实在是有太多困难.又复杂的操作,时间紧任务重这一天又废柴了,哎! 别担心,今天将为您分享个逆天强大的EXCEL辅助工具,帮大家快速搞定—— ...

  2. vue & nodejs jwt 的基于token身份验证

    现在比较流行的验证方式,是带着token的登录验证 原理 1. 登陆时,客户端发送用户名密码 2. 服务端验证用户名密码是否正确,校验通过就会生成一个有时效的token串,发送给客户端 3. 客户端储 ...

  3. 智能家居手势识别,只需百度AI即可搞定

    上次我尝试做了一个给眼镜加特效,针对的是静态图像,具体文章参考 https://ai.baidu.com/forum/topic/show/942890 . 这次我尝试在视频中加眼镜特效,并且加上手势 ...

  4. 4.Redux学习4----react-redux

    react-redux是配合redux一起使用的,其中核心组件是Provider Provider是store的提供器,用Provider则store就无需直接引入组件内,而且还可以将一个store公 ...

  5. mac-安装sshpass

    在配置了ssh免密认证id_rsa.pub之后,在cmd终端可以实现免密登陆对应配置了密钥的服务器,但是在python程序中,想要调用cmd执行免密操作,还需要安装sshpass,sshpass用于非 ...

  6. Promise代码详解(show you the code)

    认识异步函数 同步函数: const sum1 =(a,b)=>{ return a+b } console.log('AAA'); console.log(sum(5,6)); conosle ...

  7. 测试人员必备之 mysql 常用命令学习指南

    1.数据库连接 1.通过命令行连接数据库 [root@localhost ~]# mysql -u root -p Enter password: 输入以上命令,回车后输入密码,回车,出现 mysql ...

  8. HTTP Error 500.19 - Internal Server Error 无法读取配置文件

    将Code移动文件夹就报以下错误,http error 500.19 - internal server error. 项目文件下.vs=>config=>applicationhost. ...

  9. Word文档转为MD

    最近整理近年的一些知识笔记,需要将一些之前用word写好的文档转为markdown格式,主要的方法是先将word转换为html格式,再将html转换为markdown格式. Step1. Word t ...

  10. 如何用Jpype创建HashMap和ArrayList

    近期在Python中使用java语言的时候有涉及到如何创建HashMap和ArrayList等容器,最开始的疑惑是,java里面的容器是有泛型做类型检测的,而在python中却没有泛型这个说法,那么如 ...