Automatic File Naming

mezr

Active Member
Joined
Feb 2, 2003
Messages
301
Hello all,
I'm trying to rewrite some old VBA that had been used for automatically renaming a file. It no longer works since switching over to Office 2013. The existing code is as follows ...

______

Private Sub CommandButton3_Click()

ThisWorkbook.SaveAs Filename:=Left(ThisWorkbook.FullName, Len(ThisWorkbook.FullName) - 12) _
& Sheet3.Range("A19").Text & "_" & Sheet3.Range("E4").Text

End Sub

______

In the end, the file name should look something like this - "fox-l2-frm1-111914-tml-timesheet_10-31-2014_John Smith" with the "10-31-2014" being the variable residing in A19, and "John Smith" being the variable residing in E4.

Thank you in advance for your suggestions.
 
I'm out. I've seen that error several times with MISSING references, but can't think of another cause. Apologies.

/AJ
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Adam, I think we cross posted. I scrolled down and noticed a calendar control that was labeled as "MISSING". I unchecked it and it all seems to be working fine now. Thank you for guiding me to a solution! :)
 
Upvote 0

Forum statistics

Threads
1,215,601
Messages
6,125,758
Members
449,259
Latest member
rehanahmadawan

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