View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] CatchFrank@gmail.com is offline
external usenet poster
 
Posts: 4
Default Disable the prompt when clicking on a protected cell?

Thanks again Ron. I re-pasted the code into the VB excel object
associated with the entire workbook, i.e. 'ThisWorkbook'. It now works!
(Before it was pasted into some other excel object related to an
individual sheet. My apologies for the previous misunderstanding!)

Another question regarding directory path validation...The following
code works fine with normal path input:

'Set FileExists to FileSystemObject
If outgoingFilePath = "\" Or Dir(outgoingFilePath, vbDirectory)
= "" Then
MsgBox outgoingFilePath & " is not a valid file path.
Please try again", vbExclamation, "Invalid Path"
End
End If

However, it will fail if outgoingFilePath is somewhat outrageous, say
'C:C:\' or 'CC:\', in which case run-time error 52 is fired, stating
'Bad file name or number'. Idealy ANY incorrect path input should be
captured by the code instead, without generating any run-time
error...So how the above code can be fortified to properly handle ALL
input situations? Many thanks in advance!!

Regards
Frank