Greetings!
I have a question, I've been using some simple code to set the Sheetname as cell value for some time (incidentally I think its from MrExcel too), I want to adjust it, but really haven't the slightest on how...
Current;
What I would like to achieve is hitting the button, it runs through and does its thing, six unrelated bits and bobs and then sets the name... I'd like a little more detail by grabbing the contents of cell A2, and prompting for the last bit which is not in the spreadsheet...
The sheetname should end up looking like;
"Ticket-##### - Device 123456"
123456 is Cell A2 value
##### being a user prompt for a number in 5 to 6 digits
Can any Excel wizards assist in this?
Thanks,
vortensis
I have a question, I've been using some simple code to set the Sheetname as cell value for some time (incidentally I think its from MrExcel too), I want to adjust it, but really haven't the slightest on how...
Current;
VBA Code:
Sub SetTabName()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Activate
ws.Name = Range("A2").Value
Next
End Sub
What I would like to achieve is hitting the button, it runs through and does its thing, six unrelated bits and bobs and then sets the name... I'd like a little more detail by grabbing the contents of cell A2, and prompting for the last bit which is not in the spreadsheet...
The sheetname should end up looking like;
"Ticket-##### - Device 123456"
123456 is Cell A2 value
##### being a user prompt for a number in 5 to 6 digits
Can any Excel wizards assist in this?
Thanks,
vortensis