self tracking, re-open

marnieh

New Member
Joined
Oct 28, 2014
Messages
1
I am trying to setup a worksheet to file save as G5, J4 & J5, have that working except would like to remove the path. I want to the file save as box to show up to designate where to save the file as of right now it is saving automatically (and everyone sets up their computers differently...lol) also, the tracking number is not changing when closed and reopen or even on file save as has been completed. (would like the new file to close and reopen the original with the tracking number updated. Also with the tracking number the msgbox is not working

Sorry, pretty new to vba an all my searching on the forums has given me the following code:

Public Sub SaveAsA2()
ThisFile = Range("J4") & Range("G5") & " " & Range("J5").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub


Private Sub Workbook_Open()
'Place this code in the "ThisWorkbook" Module
'to increment on the opening of the workbook.

'Sub Worksheet_Activate()
'Use the "Activate" Sub in a Sheet Module
'to increment on a sheet selection.

[J4].Value = [J4] + 1
ActiveWorkbook.Save
MsgBox "Each time this sheet is opened" & Chr(13) & "the starting number is increased." _
& Chr(13) & "And this blank template is saved" & Chr(13) & _
"with the new starting number!" & Chr(13) & Chr(13) & _
"Please, save any added data" & Chr(13) & "with a new file Name!" & Chr(13) & Chr(13) & _
"To preserve system integrity" & Chr(13) & "follow these directions!"
End Sub
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,214,812
Messages
6,121,693
Members
449,048
Latest member
81jamesacct

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