determine username computer name and save worksheet to filename in a cell

Status
Not open for further replies.

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
65
Hello brainiacks, (said with utmost respect). here is my problem:

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

The path would always be the same:

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

the NewFileName (inQ2) will change depending on the customers name and quote number that is used by the code when creating the filename and storing it in Q2.

in the workbook configureData.xlsm, the existing macro uses the current customers name and quote number and concatenates these into Q1. then the macro copies Q1 and pastes to Q2 using save special values.

Your help will be appreciated hugely.
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,707
Office Version
365
Platform
Windows
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,099,509
Messages
5,469,038
Members
406,629
Latest member
Alan365

This Week's Hot Topics

Top