How To Save Program To File On Network Folder?

aedctalk

Board Regular
Joined
Oct 9, 2010
Messages
156
Hi So currently i use the below to save my file

Dim myFolder As String, mySheet As String
myFolder = Sheets("Configuration").Range("J21").Value
ChDir myFolder

ActiveWorkbook.SaveAs Filename:="BOWSER"



==========

My J21 is C:\Documents and Settings\Manager\Desktop\BOWSER

However.. I'm really want to save to C drive on another computer. The path is \\1031mbo3\c\Documents and Settings\Manager\Desktop\BOWSER

However.. It doesnt save to there. It doesnt work for some reason.

Any ideas on how i can save the program via a macro... either without having to worry about pathnames or save to c drive on another computer's folder within my network?

Thanks so much!! :)
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I doubt that the user has given you permission to do that. Check their Share folders Start > Network.
 
Upvote 0
Well its my job. all our computers are on network where we can access folders on other computers. I thought saving to file on another computer might be possible.

Can i just "save file" and it would work? (so long as i open it from file on other computer?

Instead of using save file as? (which is only way i've tried)?
 
Upvote 0
ChDir won't change drives.

Just specify the fully qualified filename (path and file) when you do the SaveAs, and it will work fine if you have write permission.
 
Upvote 0
wow shg! thanks! that did work! This whole time i'd been trying with Chdisk!

Just putting the exact path name made it work!

Thanks so much!!


One more question it leads me to..

I'm configuring this program from a bunch of bussinesses within my jobs disctrict. So each business i would prefer to be able to specify their own pathname...

Is there any way that will be possible? without them having to go into vba and change the value there?

I'd like to still be able for them to put the path name in Configuration J21..

Any ideas? Thanks so much!
 
Upvote 0
You can always add an InputBox, Userform, or from the cell.
Code:
ActiveWorkbook.SaveAs Filename:=Sheets("Configuration").Range("J21").Value & "BOWSER.xls"

You may have to concatenate a "/" or a "\" to your J21 value.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top