Excel Add-in VB.net - determine if active workbook has macros
Hi
I have quite a complicated add-in the causes strange errors if i open Excel by opening
a .xlsm file. I need to determine if the ActiveWorkbook is a .xlsm file.
How do I do this?
Private Sub ThisAddIn_Startup() Handles Me.Startup
If Globals.ThisAddIn.Application.ActiveWorkbook.FileFormat.ToString <> "52" Then
oAddInStartUp()
End If
End Sub
Microsoft ExcelVisual Basic.NET
Last Comment
Murray Brown
8/22/2022 - Mon
Nasir Razzaq
What happens with above code?
Murray Brown
ASKER
If it is a .xlsm it doesn't load my add-in. I have to go into the Option Add-ins section and select COM Add-ins then re-check the box to make it available as the system unchecks this.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.