Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing Customizations On Quick Access Toolbar When I Reopen File William Excel Discussion (Misc queries) 2 June 17th 09 03:22 AM
How do I find and reopen an excel file I created earlier? Happy Grandma Excel Discussion (Misc queries) 2 January 28th 09 10:56 PM
Hidden Tabs appear when I reopen the file Brenda Setting up and Configuration of Excel 11 October 24th 08 12:39 AM
Hyperlinks breaking when save/reopen file... taylorj Excel Discussion (Misc queries) 2 April 3rd 06 09:33 AM
Excel tries to reopen the file Walt Weber Excel Programming 1 July 18th 03 02:18 AM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"