Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub helpfile()
Dim Thehelpfile As Boolean Thehelpfile = False On Error Resume Next Thehelpfile = (Len(Dir("P:\Consignit Templates\Consignit\Word\helpfile\How to use the word templates.doc")) 0) On Error goto 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 -- Regards, Tom Ogilvy wrote in message ups.com... 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display a message when a file is opened. | New Users to Excel | |||
Display a message when opening Excel file | Setting up and Configuration of Excel | |||
Checking whether a worksheet exist or not | Excel Programming | |||
Checking whether a worksheet exist or not | Excel Programming | |||
Display a Message box while opening a XLS file | Excel Programming |