944,193 Members | Top Members by Rank

Ad:
May 18th, 2007
0

Bypassing Excel file opening message

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mg1969 is offline Offline
2 posts
since May 2007
May 21st, 2007
0

Re: Bypassing Excel file opening message

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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
shasur is offline Offline
20 posts
since Aug 2006
May 21st, 2007
0

Re: Bypassing Excel file opening message

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mg1969 is offline Offline
2 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB Macro query - overwriting existing files
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Anybody Plz. Help Me URGENT Requirement.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC