Set the save path based on a cell value

Yeoman.jeremy

Board Regular
Joined
Apr 4, 2011
Messages
90
Hi there,

Is there a way to set the save path as a cell value?

At the moment i set the path using
Code:
ChDir "C:\Users\owner\Desktop\Development"
in the vb coding, but it gets tedious, as i have to change this for 4 different modules in at least 3 computers in each store, in approximately 18 stores everytime i make an update to my workbook.

I want the directory to be written into a cell, which this coding points to so i don't have to search throuhg my modules to find the specific piece of code, instead i can just change the directory each computer


help[ much apppreciated,
 
Code:
Sub Sub1()

    Dim strFilePath As String
    
    strFilePath = Environ$("UserProfile") & "\Desktop\" & Worksheets("Sheet1").Range("A1")

End Sub
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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