简体   繁体   中英

How can I open a macro workbook with VBA?

I kind of renamed the personal macro workbook and copied it to the server for my teammates to access. When you manually open the macro workbook it only opens in VBA without showing an actual workbook, but when I try to do it with VBA, a physical workbook opens up.

Dim MyFolder As String
MyFolder = "file:///\\FPSFILES1\ReviewPricing\Macro Data\RP Macro Wrkbk.xlsb"
ActiveWorkbook.FollowHyperlink MyFolder

How can I get the workbook to open in VBA only so users don't see a physical book that they can close (which closes it in VBA too)?

您可以使用ActiveWindow.Visible = False

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM