Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

In Excel, why does my VB not work when launched from IE ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 20 Mar 2006 15:49 GMT
I have a small VB project which works fine when launched by MSExcel, but
fails when launched by hyperlink from a webpage (IE5).  

The file booking.xls opens 4 other xls files and copies data from them, but
when launched from within IE, it opens the files OK but cannot then move
focus to them in order to copy cells.  

Does IE require different ways of linking? I used workbooks.open (4 times)
to find and open the subordinate files, then windows(bookname).activate plus
sheets(sheetname) to switch to each of then in turn.  When launched from IE,
this produces a Run-time error '9' (Subscript out of range) - which I guess
means that the bookname parameter is not picked up.
Tom Ogilvy - 20 Mar 2006 16:01 GMT
Are they being opened in separate instances of Excel when launched from IE
and within the same instance when launched from MS Excel?  

Signature

Regards,
Tom Ogilvy

> I have a small VB project which works fine when launched by MSExcel, but
> fails when launched by hyperlink from a webpage (IE5).  
[quoted text clipped - 8 lines]
> this produces a Run-time error '9' (Subscript out of range) - which I guess
> means that the bookname parameter is not picked up.
David C - 20 Mar 2006 16:01 GMT
In MSExcel they launch as 5 separate instances, whereas from IE they launch
as one (the first) as xl within a IE window, and the other 4 all within a
single Excel window.  (weird eh? )

I tried an intermediate xl sheet which just opens the first file; this gives
the intermediate in IE and 5 within xl.  AND (!) in this case, the first ends
up as a hidden window.  By manually uphiding this, it runs fine as expected.  
(weirder and weirder!)

> Are they being opened in separate instances of Excel when launched from IE
> and within the same instance when launched from MS Excel?  
[quoted text clipped - 11 lines]
> > this produces a Run-time error '9' (Subscript out of range) - which I guess
> > means that the bookname parameter is not picked up.
David C - 21 Mar 2006 10:46 GMT
Curiously, I have discovered that linking to a shortcut works fine;  what is
that all about?  When I open "Shortcut to <filename>.lnk" from IE5, I get the
usual OPEN or SAVE options, and either way, it works properly.

> In MSExcel they launch as 5 separate instances, whereas from IE they launch
> as one (the first) as xl within a IE window, and the other 4 all within a
[quoted text clipped - 20 lines]
> > > this produces a Run-time error '9' (Subscript out of range) - which I guess
> > > means that the bookname parameter is not picked up.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.