save file path as string variable

Schzuki

New Member
Joined
Jun 6, 2013
Messages
34
Hi,

I am stuck with this bit of my code. Any help would be greatly appreciated!
The macro I am running loops through a list of values, does some calculations and then generates a report of these calculations. After saving this report it loops back to the next value in my list and repeats the process. So far so good.

I would like the saving to be automated, but I can't figure out how to do that.

What I want is the following:

'ask user for save folder (the destination in which all report files should be saved)
'save this destination as a variable
'do a bunch of stuf
'generate report name
'generate save path by pasting the destination variable and the report name (savefileas destination&"/"&reportname)
'save it!

I can't figure out how to get the destination-variable without any unnecessary lines attached.



Any suggestions?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,215,108
Messages
6,123,128
Members
449,097
Latest member
mlckr

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