Bypassing Excel file opening message

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2007
Posts: 2
Reputation: mg1969 is an unknown quantity at this point 
Solved Threads: 0
mg1969 mg1969 is offline Offline
Newbie Poster

Bypassing Excel file opening message

 
0
  #1
May 18th, 2007
Hi all, first post.

I am working with excel files which get their data from htm files on the same folder location. Every time I open the xls file I get a prompt "Some of the files in this web page arent in the expected location. Do you want to download them anyway? If you're sure the web page is from a trusted source, click yes" and there are buttons for yes, no and cancel.

Is there some vba code (I am using v6) I can write which will select "Yes" when the file is being opened so I dont have to click every time?

Thanks for your help.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 20
Reputation: shasur is an unknown quantity at this point 
Solved Threads: 1
shasur shasur is offline Offline
Newbie Poster

Re: Bypassing Excel file opening message

 
0
  #2
May 21st, 2007
If this is the message popped up by Excel you can cancel that by

Dim oXL As Excel.Application

oXL.DisplayAlerts = False

after you complete you can reset by

oXL.DisplayAlerts = True
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 2
Reputation: mg1969 is an unknown quantity at this point 
Solved Threads: 0
mg1969 mg1969 is offline Offline
Newbie Poster

Re: Bypassing Excel file opening message

 
0
  #3
May 21st, 2007
Hi Shasur,

Thanks for the reply. I think I get what you are suggesting, but the thing is I need to actually select the "yes" button which is not the default option. I think if I do what you suggest, yes it will open the file without a message but it will open with the default of "no" which is to not populate the spreadsheet with data.

Cheers.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1294 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC