Automate Filename on 'Save As'

Cadnium

New Member
Joined
Aug 15, 2011
Messages
4
Hi All,

I have just spent an hour an a half trying to get this to work with no luck.

I have a read only file which I want to automatically name when the person using it goes to save it. The filename has been automated in 'Sheet4' cell "F5". I can get the VBA code to work at time, but I cannot get it to trigger when you go to save the sheet using the normal 'Save' or 'Save As' commands.

I already have a bit of VBA code in the document so I was not sure on how to write or trigger this part.

Any help would be greatly appreciated.

Cheers,

Cadnium
 
Re: Attachment Macro

.Attachments.Add("H:\PALMERL\" & Sheets("Sheet1").Range("A1").Value)
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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