LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking that file exist and if not display a message

Hi,

wrote some code for this:

Sub helpfile()

Dim Thehelpfile As Boolean

Thehelpfile = (Len(Dir("P:\Consignit
Templates\Consignit\Word\helpfile\How to use the word templates.doc"))
0)

If Thehelpfile = True Then
Application.Documents.Open Filename:="P:\Consignit
Templates\Consignit\Word\helpfile\How to use the word templates.doc"
Else
MsgBox "This functionality only works on the CAB office
Computers, You can download this help file from the intranet under
Tools/Templates"
Exit Sub
End If
End Sub

The problem is that if I pull the networkcable I get an error message
instead of the msgbox message I've written.

How to amend this so that if the networkdrive containing this file is
not available my message should appear?

Please help.

Thx!

/Jan

 
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
Display a message when a file is opened. Sheila New Users to Excel 4 November 15th 05 05:14 PM
Display a message when opening Excel file Julie Setting up and Configuration of Excel 1 August 10th 05 06:08 PM
Checking whether a worksheet exist or not ajitpalsingh200[_18_] Excel Programming 0 November 10th 04 05:44 AM
Checking whether a worksheet exist or not ajitpalsingh200[_17_] Excel Programming 4 November 9th 04 01:30 PM
Display a Message box while opening a XLS file Rajesh[_2_] Excel Programming 0 November 10th 03 07:11 AM


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

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

About Us

"It's about Microsoft Excel"