Hello. I'm new to VBA and have managed to create a macro that copies my workbook x number of times; however, it fails after the first copy because the filename for the next copy is the same as the first copy. Can you please help me increment the filename? The cell ("G5") that is used to generate the filename contains an integer (e.g., 2345), so I just need to increment it by 1 each time.
This is what I currently have. Any help you can provide would be greatly appreciated!
Dim numtimes As Long
Dim strSaveName As String
Dim x As Integer 'Loop counter
x = Worksheets("Production Record (ATFx)").Range("I2").Value
For numtimes = 1 To x
'Get string to save new workbook as
strSaveName = Worksheets("Production Record (ATFx)").Range("F5").Value & Worksheets("Production Record (ATFx)").Range("G5").Value
'Copy the workbook
'Save the newly created workbook
'Increment the workbook name ?