954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Bypassing Excel file opening message

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.

mg1969
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

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

shasur
Newbie Poster
20 posts since Aug 2006
Reputation Points: 10
Solved Threads: 1
 

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.

mg1969
Newbie Poster
2 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You