G
Guest
I noticed the answer to this question for 3/24/05, however I can't seem to
make it work...
--------- this second option assumes that you have all the sheets in the
workbook and you want to name them as per the list in A2:A10
Sub namesheets()
Dim arr As Variant
arr = Range("a2:a10").Value
For i = LBound(arr) To UBound(arr)
Sheets(i + 1).Activate
Sheets(i).Name = arr(i,1)
Next i
End Sub
-------
to use either of the above, right mouse click on a sheet tab and choose view
code
this will display the VBE Window
choose insert / module from the menu and you'll get a piece of white paper
on the right hand side of the screen
copy and paste the code above from the word sub to the words end sub into
the right hand side of the screen
press ALT & F11 to return to your workbook
ensure your loan numbers are in cells A2:A10 of the sheet you're viewing and
choose tools / macro / macros from the menu
choose either namesheets or newws as appropriate and click on the run button
hope this helps
What am I doing wrong???? Does it make a difference that I want to start on
Sheet 4, and continue for 40 sheets?
Or the fact that the Cells that I am using are on Sheet 1 ("Record"
AA18:AA57)?
Or lastly, the fact that the information that I want to use is in date format?
make it work...
--------- this second option assumes that you have all the sheets in the
workbook and you want to name them as per the list in A2:A10
Sub namesheets()
Dim arr As Variant
arr = Range("a2:a10").Value
For i = LBound(arr) To UBound(arr)
Sheets(i + 1).Activate
Sheets(i).Name = arr(i,1)
Next i
End Sub
-------
to use either of the above, right mouse click on a sheet tab and choose view
code
this will display the VBE Window
choose insert / module from the menu and you'll get a piece of white paper
on the right hand side of the screen
copy and paste the code above from the word sub to the words end sub into
the right hand side of the screen
press ALT & F11 to return to your workbook
ensure your loan numbers are in cells A2:A10 of the sheet you're viewing and
choose tools / macro / macros from the menu
choose either namesheets or newws as appropriate and click on the run button
hope this helps
What am I doing wrong???? Does it make a difference that I want to start on
Sheet 4, and continue for 40 sheets?
Or the fact that the Cells that I am using are on Sheet 1 ("Record"
AA18:AA57)?
Or lastly, the fact that the information that I want to use is in date format?