Good Afternoon - I have a workbook with 20 worksheets and will like to re-name the worksheets with the values in a range i.e A1:A20 with the click of a command button. How do I do this?
Code example:
dim ws as worksheet, rng as range
sheets("Sheet1").select
sheets("Sheet1").range("A1:A20").select
for each ws.worksheets
for each rng in selection.cells
ws.name = rng
next
next
Code example:
dim ws as worksheet, rng as range
sheets("Sheet1").select
sheets("Sheet1").range("A1:A20").select
for each ws.worksheets
for each rng in selection.cells
ws.name = rng
next
next