Looking For A Suggestion About How To Write Code

A

abxy

Hi,

The vba code for my userform, as it is right now, references specifi
drives (C:, D:, E:, etc) when opening up and saving workbooks. Thes
are network drives though. And in the case that the network driv
letters would change, my userform wouldn't work.

Do you all have any suggestions for somehow writing my code or addin
something to it so that in the case of the network drive letter
changing, I can make the code reference a different specified driv
letter? So that way, I wouldn't have to go through all of my code
replacing certain parts all over it with the new drive letter
everytime my files move to a new network drive.

Any suggestions would be appreciated. Thankyou :
 
A

abxy

Hey Tom,

You've helped me out tremendously yet again and I just wanted t
thankyou for pointing me in the right direction about this.

After using the code on the page you linked to, I could get UNC path
for the network drives and now my code references those paths instea
of drive letters. So no matter what the drive letters change to, m
userform will still work. :)

I'm also doing a few other things so that I can easily change the UN
paths referenced via a textbox on the userform now too. This way I'l
never have to alter any vba code if the files are moved to anothe
drive
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top