Is there a way to set the number format within a macro.
Currently I am having to change the formula to include & "00" (and change it to & "0" when the number of sheets goes into double digits), the format I need it to show is "AAA_001" which increases by 1 each time. See below. If I don't include the zeros the format will be "AAA_1"
Formula below:
'Add reference number to new sheet
Sheets("TEMPLATE").Select
Sheets("TEMPLATE").Cells(3, 9) = "AAA_" & "00" & (NSheets + 1)
Currently I am having to change the formula to include & "00" (and change it to & "0" when the number of sheets goes into double digits), the format I need it to show is "AAA_001" which increases by 1 each time. See below. If I don't include the zeros the format will be "AAA_1"
Formula below:
'Add reference number to new sheet
Sheets("TEMPLATE").Select
Sheets("TEMPLATE").Cells(3, 9) = "AAA_" & "00" & (NSheets + 1)