Check If Connected To Network

  • I have created an application for users that requires the user be connected to the network. I wanted to do a check to see if they are connected, and if the user is not connected they would get a message box telling them that they need to be connected to the network, then the workbook would close.


    Below is the code I have, but when a user is not connected they do not get my messagebox, instead they get the excel error message "excel run-time error '52': bad file name or number", and the debugger line that gets highlighted is in the function DirExists that checks the length of the directory of the file path: Len(Dir(strpath))



    Could anyone please help me figure this out? Thanks in advance[hr]*[/hr] Auto Merged Post;[dl]*[/dl]Anyone out there to help? Thanks

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!