Is it possible?

Lazarus416

Board Regular
Joined
Feb 20, 2013
Messages
103
I use the "ActiveWorkbook.SaveAs Filename:=" code to auto save my workbook to a share drive whenever I run a macro. However, I'd like to export my macro out so that other people can use it and since they all save their docs to different places on the share drive, I was wondering if there is a way to make the macro prompt for the saving location every time the macro is run instead of including the file path in the script?

Alternatively, is it possible to make a macro that you run ONCE asking for a save/file path and have that one time only macro modify the VBA code in the primary one to reflect the desired path?

Thanks in advance,

Laz
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
ENVIRONS() can give you various paths that are in the system

as your file might share the same names, maybe you should get people to save archives to their local desktop, then copy them over at end of day

OR

you put a path statement onto a sheet and use that
 
Upvote 0
as your file might share the same names, maybe you should get people to save archives to their local desktop, then copy them over at end of day

The whole point behind the macro is to let people open up a downloaded, raw (mostly unreadable) CSV document, reformat it into something usable and auto save into the same place with the same name every time. It minimizes any possible confusion and/or mistakes when linking to the new spreadsheet. (These are not shared copies btw, each user will have their own that refers to their own unit.)

you put a path statement onto a sheet and use that

Not sure what you mean by this? Do you mean put the path into a separate cell/sheet and then have the VBA code refer to that cell? Is that even possible with the auto-save code?
 
Upvote 0
last bit yes, everybody will have their own path, and that text cab be used

if they delete it, then create an alternate that is hard coded as a back up
 
Upvote 0
Cool, I appreciate the info. I didn't know a cell could be referenced for the auto save. That's probably the easiest way to do it for people with questionable Excel or computer skills.
 
Upvote 0

Forum statistics

Threads
1,202,990
Messages
6,052,962
Members
444,622
Latest member
Kriszilla

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