Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you added a reference to the VBE library?
What is the text of the error you get? Tim -- Tim Williams Palo Alto, CA "Zhwgnon Flrq" <Zhwgnon wrote in message ... 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got the solution.
The text of the error message was: Programmatic Access to Visual Basic Project is unsafe. The code was written against Excel 2000, but in XP and 2003, security has been enhanced. The solution is documented he http://support.microsoft.com/kb/q282830/ "Tim Williams" wrote: Have you added a reference to the VBE library? What is the text of the error you get? Tim -- Tim Williams Palo Alto, CA "Zhwgnon Flrq" <Zhwgnon wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros enabled but will not run in excel 2007 | Excel Discussion (Misc queries) | |||
Programmatically finding 2007 Excel and other Office GUIDs | Setting up and Configuration of Excel | |||
Open workbook-macros enabled, opening another with macros | Excel Programming | |||
Fail if macros are not enabled? | Excel Programming | |||
Calling Excel FUNCTION MACROS Programmatically from VB | Excel Programming |