Save Workbook with name generated from excel data

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
128
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Hello brainiacks, (said with utmost respect). Please help with my problem:

I have some code in a workbook named configureData.xlsm that creates a filename in Q2 .
I want to open a new workbook.xlsx and save it with the fileName created.

The path would always be the same:

UsersName = Environ("USERNAME")
strFileName = "C:\Users" & UsersName & _
"\Desktop\Excalibur Winner\configureData.xlsm\NewFileName.xlsx"

but the NewFileName will change depending on the data used by the code when creating the filename and storing it in Q2.
Your help will be appreciated hugely.

kind regards
Andy
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You are welcome.
Merry Christmas and Happy New Year.
 
Upvote 0
Can you please post the rest of your code, as there is nothing in what you have posted that saves the file.
Hi Fluff
thank you for your interest, but my question has been resolved.
mauch appreciation,
andy
 
Upvote 0
.
andymalan

You are to be commended for responding to Fluff even though you received an acceptable answer.

Too many times assistance is requested from the volunteers on this and other Forums and the OP never responds with anything ... even when they receive a solution.
As a volunteer ... when this type of non-response is experienced numerous times ... it causes one to question whether continuing to volunteer is worth it.

So ... from someone who has experienced the good and bad from individuals requesting assistance ... THANK YOU for taking the time to "speak" to everyone
involved in your request.

Happy New Year !
 
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,961
Members
452,539
Latest member
delvey

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