Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skipping 'reopen' file prompt box using VBA
Hi all,
I have a piece of code that opens another spreadsheet, imports some data, saves a closes down that file. this file that has shared access so it can be updated similtaneously over a network. However, if I have this particular file open on my machine and I run the above code, I get the prompt box stating, "example.xls is already open. Reopening will cause any changes to be discarded. Do you want to reopen example.xls?", Yes or No...! Is there any way of answering yes to this prompt box within the code so it does not appear? Thanks in advance, Bhupinder Rayat |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skipping 'reopen' file prompt box using VBA
Bhupinder, This will reopen an open file without the warnings.. but note that any changes are discarded! Application.DisplayAlerts = False Workbooks.Open (sPath) Application.DisplayAlerts = True -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Bhupinder Rayat wrote : Hi all, I have a piece of code that opens another spreadsheet, imports some data, saves a closes down that file. this file that has shared access so it can be updated similtaneously over a network. However, if I have this particular file open on my machine and I run the above code, I get the prompt box stating, "example.xls is already open. Reopening will cause any changes to be discarded. Do you want to reopen example.xls?", Yes or No...! Is there any way of answering yes to this prompt box within the code so it does not appear? Thanks in advance, Bhupinder Rayat |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skipping 'reopen' file prompt box using VBA
keepITcool,
thanks for that, with a bit a tweeking, it works like a charm!! Bhupinder // "keepITcool" wrote: Bhupinder, This will reopen an open file without the warnings.. but note that any changes are discarded! Application.DisplayAlerts = False Workbooks.Open (sPath) Application.DisplayAlerts = True -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Bhupinder Rayat wrote : Hi all, I have a piece of code that opens another spreadsheet, imports some data, saves a closes down that file. this file that has shared access so it can be updated similtaneously over a network. However, if I have this particular file open on my machine and I run the above code, I get the prompt box stating, "example.xls is already open. Reopening will cause any changes to be discarded. Do you want to reopen example.xls?", Yes or No...! Is there any way of answering yes to this prompt box within the code so it does not appear? Thanks in advance, Bhupinder Rayat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Losing Customizations On Quick Access Toolbar When I Reopen File | Excel Discussion (Misc queries) | |||
How do I find and reopen an excel file I created earlier? | Excel Discussion (Misc queries) | |||
Hidden Tabs appear when I reopen the file | Setting up and Configuration of Excel | |||
Hyperlinks breaking when save/reopen file... | Excel Discussion (Misc queries) | |||
Excel tries to reopen the file | Excel Programming |