View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Zhwgnon Flrq Zhwgnon Flrq is offline
external usenet poster
 
Posts: 1
Default Programmatically finding out if Excel macros are enabled.

How can I find out through VB 6.0 whether macros are enable in an Excel 2003
application?

I tried the following but it does not work:

Set ea = CreateObject ("Excel.Application")

' test.xls has macros
Set wb = ea.Workbooks.Open ("e:\test.xls")

' This line bombs out
MsgBox (ea.VBE.VBProjects.Count)

Any help will be appreciated. Thanks.