Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to ignore Excel Popup messages during Excel Book Scanning 1

Status
Not open for further replies.

Checking

Technical User
Nov 27, 2003
26
BE
Hi there,
After setting up code to Scan and import Excel workbooks' Cell Data, I've ended up with one remaining issue here;
My code scans workbooks in certain network directories, fetching new or changed celldata, populating data in MS Access tables. All of this is working perfectly, the only thing is when it scans excelbooks containing links to other workbooks, an excel message pops up asking to update linked information. I would like to get rid of all of these messageboxes by accepting "Yes" by default and this powered by MSAccess Code. So I'd like to modify my VBA-code with (hopefully one) codeline forcing a "Yes" in the Excel messagebox. Can this be done from MS Access ? (Kind of SendKeys issue here ?)

I looked allover the threads but didn't find such a topic. (Is this a challenge ?) ;-)

Thks & K. Rgds

Belgium
 
The second argument in open workbooks controls this:

[tt]xl.Workbooks.Open "TT.xls", True[/tt]
 
Briljant Remou! Works like a charm.
The only remaining issue is when another user has an xls book open while the MSAccess code runs through the xls files. In that case a popup asks to confirm reading the file as read-only. Is there an easy solution to ignore, skip, or automatically accept ?
Thanks very much & Rgds from

Belgium
 
From time to time I have to extract some information from Excel files stored on the network I use the following (Excel not Access) this might help.

If Application.Calculation = xlCalculationAutomatic Then
Application.Calculation = xlCalculationManual
End If
Application.ScreenUpdating = False
DisplayAlerts = False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top