Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error in Excel VBA
"VJ" wrote in message ... Hi, I am getting the following err If I tried to access the properties of the form during run time from another workbook. Method 'Properties' of object '_VBComponent' failed -2147467259 Following is my code Set mynewform = Workbooks(template_Name).VBProject.VBComponents.It em(module_Name) With mynewform For Each FormProperty In .Properties If FormProperty.Name = "ShowModal" Then FormProperty.Value = False End If Next End With But If I run the same code in debug mode, It works fine. Can somebody suggest me any way around? Thanks, Have you set a reference to the VBA Extensibility library? /Fredrik |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automation Error in Excel VBA
If this is refering to a real template, the name of the workbook you are
refering to won't be the name of the template if it was opened with File=New and then the template was specified. -- Regards, Tom Ogilvy "VJ" wrote in message ... Yes, I have referenced to Microsoft Visual Basic for application extensibility for 5.3. I am also able to compile it and and it works fine in the debug mode. "Fredrik Wahlgren" wrote: "VJ" wrote in message ... Hi, I am getting the following err If I tried to access the properties of the form during run time from another workbook. Method 'Properties' of object '_VBComponent' failed -2147467259 Following is my code Set mynewform = Workbooks(template_Name).VBProject.VBComponents.It em(module_Name) With mynewform For Each FormProperty In .Properties If FormProperty.Name = "ShowModal" Then FormProperty.Value = False End If Next End With But If I run the same code in debug mode, It works fine. Can somebody suggest me any way around? Thanks, Have you set a reference to the VBA Extensibility library? /Fredrik |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automation error kills excel | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
VB Excel Automation Error | Excel Programming |