使用VBA在excel 2007中使用自定义Tab [英] consuming custom Tab in excel 2007 with VBA
本文介绍了使用VBA在excel 2007中使用自定义Tab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在ms excel 2007中创建了自定义选项卡。它对于那个excel文件很有用。但是我想将所有自定义选项卡用于所有excel打开文件。请告诉我该怎么做。
这是我的代码:
i将此代码放在VBA项目的Module1中。
i have created custom tab in ms excel 2007.It is working good for that excel file.But i want to use that custom tab to all excel open files.Please tell me how to do that.
Here is my code:
i placed this code in Module1 in VBA project.
Sub save(control As IRibbonControl)
Dim OrigName As String
OrigName = ActiveWorkbook.FullName
ActiveWorkbook.SaveAs "D:\macro" + "\" + ActiveWorkbook.Name
MsgBox "saved in D:\macro"
End Sub
推荐答案
将工作簿保存为Excel插件,然后加载 [ ^ 进入Addins系列。
欲了解更多信息,请参阅:
在Excel 2007中开发加载项(XLL) [ ^ ]
创建VBA加载项以扩展和自动化Microsoft Office文档 [ ^ ]
Save your workbook as Excel addin then load it[^] into Addins collection.
For further information, please see:
Developing Add-ins (XLLs) in Excel 2007[^]
Creating VBA Add-ins to Extend and Automate Microsoft Office Documents[^]
这篇关于使用VBA在excel 2007中使用自定义Tab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文