Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a problem with a tiny bit of code at work today and
hoped one of you may have the answer. In my department, our IT guys are so clever that some people have the departments files stored on the G:\ drive, and some on the K:\ (dont ask). Therefore, at the start of alot of my code I have to obtain the correct path of the person running the code. To do this, I wrote something similar to this (this is from memery): mydir = Dir("K:\", vbDirectory) If mydir "" Then Path = "K:\" Else path = "G:\" This works fine if the person running the code has the departments files on the K:\ drive, but if they are on the G:\ drive it gets a runtime error (68 if I remember rightly) probably because the K:\ doesnt exist! How can I prevent this error from happening? Apart from sack our LAN Administration guys! Cheers Jim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems with ngs | Excel Worksheet Functions | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
Problems | Excel Worksheet Functions | |||
STILL Having VBA Problems!!!!!!! | Excel Discussion (Misc queries) | |||
VBA problems | Excel Discussion (Misc queries) |