Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Automation Error(-2147467259) in Properties Collection

This is odd.

I ran the code, and as you say, I get the error.

If I then access the forms properties in the watch window, I can then run
the code fine. Change the property, and it won't run again.

No answers, yet, but I will dig around.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"VJ" wrote in message
...
Can somebody suggest me why I am getting "Unspecified Error" when the
following line of code executes.

Debug.Print

Application.Workbooks("WBName.xlt").VBProject.VBCo mponents.Item("FormName").
Properties.Item("ShowModal").Value

Before opening the workbook, I am unlocking it which is working fine but

for
some reason I am not able to get reference to the Properties collection.

It
works fine sometimes when I run in the debug mode.

Help would be appreciated.

Thanks,




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Automation Error(-2147467259) in Properties Collection

It makes no difference Simon if you use the index number, i.e. it is not
ShowModal that is the problem, but Properties collection (or at least where
it shows).

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Simon Murphy" wrote in message
...
VJ
Just guessing but...
the showmodal property is not in the object model for forms (in XP), it is

a
parameter of the show method. So I wonder if it does not exist (publicly)
until a form is shown.
As you say the code works fine if the form window is open, but not
otherwise. this is a bit like how you have to select a sheet before you

can
select a range on it.

Sorry I cant be more help
What are you wanting to do? maybe there is another way?

cheers
Simon
"VJ" wrote:

I would really appreciate your help if you can dig out the answer

because I
have used all my resources and energy to find the answer but no luck.

Regards,

"Bob Phillips" wrote:

This is odd.

I ran the code, and as you say, I get the error.

If I then access the forms properties in the watch window, I can then

run
the code fine. Change the property, and it won't run again.

No answers, yet, but I will dig around.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"VJ" wrote in message
...
Can somebody suggest me why I am getting "Unspecified Error" when

the
following line of code executes.

Debug.Print


Application.Workbooks("WBName.xlt").VBProject.VBCo mponents.Item("FormName").
Properties.Item("ShowModal").Value

Before opening the workbook, I am unlocking it which is working fine

but
for
some reason I am not able to get reference to the Properties

collection.
It
works fine sometimes when I run in the debug mode.

Help would be appreciated.

Thanks,







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
System Error &H80004005 (-2147467259) Itzik Excel Discussion (Misc queries) 7 March 31st 11 10:45 AM
system Error &H80004005(-2147467259) jks Excel Discussion (Misc queries) 4 December 17th 08 09:50 PM
How to overcome this System Error &H80004005 (-2147467259)? PK Excel Discussion (Misc queries) 0 December 17th 07 01:59 PM
Automation Error(-2147467259) in Properties Collection Bob Phillips[_6_] Excel Programming 0 April 14th 05 04:27 PM
automation error -2147467259 Tim Cadieux[_2_] Excel Programming 0 November 5th 03 05:01 PM


All times are GMT +1. The time now is 06:48 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"