Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automation error kills excel Simon Prince Excel Programming 2 December 18th 03 09:02 AM
Excel 2000 Automation Error Felix[_2_] Excel Programming 0 September 18th 03 04:56 AM
Excel 2000 Automation Error Bob Enagonio Excel Programming 1 September 17th 03 07:25 PM
Excel 2000 Automation Error Felix[_2_] Excel Programming 0 September 17th 03 04:03 PM
VB Excel Automation Error Sasanka Pinidiya Excel Programming 0 August 26th 03 08:11 AM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"