Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-25-2007, 07:50 PM   PM User | #1
dmb-job
New to the CF scene

 
Join Date: Mar 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dmb-job is an unknown quantity at this point
VB6 open Excel file problem

Code:
Set objStockList = CreateObject("Excel.Application")
    Set objStockListWB = objStockList.Workbooks.Open(StockListPathName, ReadOnly:=True)
    Set objStockListSH = objStockList.Sheets
    objStockList.Windows(1).Visible = False
Declare late bound so that any version of Excel, this is slower than early binding, not time critical. The late binding is to make this independent of Excel version.

This is used in an unattended program, thus no manual intervention is possible.
The first time this is attempted, the response is a message box indicating a choice of: "switch to" and "retry".

What can I do to avoid the unnecessary message box. The VB6 program losses focus, so it cannot send a "sendkeys".

Thanks,
Winnie-the-Pough" (sic)
"Good software like good food takes time to prepare"
dmb-job is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 AM.


Advertisement
Log in to turn off these ads.