Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Disabling the "could not open" notification

Sorry, I have looked extensively but could not find this on my own.

In VBA code:

1) Is there a way of disabling the notification that Excel was not able to
open a file?

And to try to kill two birds with one stone:

2) Is there similary a way of also disabling the window that tells you it is
(trying to / in the process of) opening a file

Thanks
Alfredo

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Disabling the "could not open" notification

1) Use On Error

on error resume next
set myWS = Workbooks.Open("MyFile.xls")
on error goto 0
if myWS is nothing then
msgbox "File not found"
exit sub
end if

2)
Didn't understand the question

HTH
--
AP



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Disabling the "could not open" notification

Thanks.

I will use that, and/or a combination with:

Application.DisplayAlerts = False
Application.DisplayAlerts = True

... which I only just discovered.


"Ardus Petus" wrote:

1) Use On Error

on error resume next
set myWS = Workbooks.Open("MyFile.xls")
on error goto 0
if myWS is nothing then
msgbox "File not found"
exit sub
end if

2)
Didn't understand the question

HTH
--
AP




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
Disabling the "&[Time]" or "&[T]" in Excel headers and footers John Mirabella Excel Discussion (Misc queries) 2 January 15th 10 02:54 PM
"File in Use" notification works on some machines, not on others Dadoo Setting up and Configuration of Excel 1 September 22nd 09 03:41 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
Disabling "SAVE AS" option under "File" Bidyut Bhattacharjee Excel Discussion (Misc queries) 3 March 22nd 06 06:35 PM


All times are GMT +1. The time now is 06:48 AM.

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"