Vba code

perka68

New Member
Joined
Jan 13, 2024
Messages
1
Office Version
  1. 365
I have a Workbook named SR.xltm with a template sheet called Mall. This sheet contains a table with empty cells for a user to fill in. The problem is that i want to put this Workbook on a usb stick and run a vba macro that creates a new instance of the file in any computer I put the usb stick in. I want the macro to create 52 copies of the template sheet in the new workbook on the computer. These 52 copies will be named with the current year_w00, where the w stands for week and 00 is the week number in integer. I got it to work in the same workbook but I would like it work from separate file on a usb stick. So just make a new excel file called SR.xlsx with 52 sheets ( copies of the sheet Mall) named with current year and w (week) 00 (as week number 01-52)
Thankful for any help i can get.
Best regards
Per-Erik
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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