Issue a name to an Excel file in a Macro

jacarter

New Member
Joined
Nov 25, 2002
Messages
12
I've created a timesheet for myself with a macro to update information in it. Now, my boss wants me to make one for the rest of my team.

My timesheet is named JAC04.xls. For me to create one for each member of the team I will need to change the Macro. For example, from JAC04.xls to SLK04.xls.

Is there a way to issue a name for the active file (or window) similar to the way I did it for the active cell as follows:

' Remember where you were:
ActiveCell.Name = "BEGIN"

This way I won't have to edit the Macros for all of the team members and edit the Macro every year.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
You mean like:

MyFile = ActiveWorkbook.Name

You can then activate it later by using:

Windows(MyFile).Activate
 
Upvote 0

Forum statistics

Threads
1,203,455
Messages
6,055,540
Members
444,794
Latest member
HSAL

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