Input Box to rename sheet?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I create a macro that uses an input box to rename a Worskheet? I'm trying to combine several macros into one macro. So far, renaming the sheet has been the hardest thing to incorporate. I received an answer earlier on how to rename the active sheet to the value in the active cell. Now, I'm looking for another variation.
Can I create a macro that uses an iput box to rename a Worskheet?
Any help would be most appreciated!
tj
 
see response in .misc.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

tjtjjtjt said:
Can I create a macro that uses an input box to rename a Worskheet? I'm
trying to combine several macros into one macro. So far, renaming the sheet
has been the hardest thing to incorporate. I received an answer earlier on
how to rename the active sheet to the value in the active cell. Now, I'm
looking for another variation.
 
Try something like the following:

Dim WSName As String
WSName = InputBox("Enter new sheet name")
If WSName <> "" Then
ActiveSheet.Name = WSName
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

tjtjjtjt said:
Can I create a macro that uses an input box to rename a
Worskheet? I'm trying to combine several macros into one macro.
So far, renaming the sheet has been the hardest thing to
incorporate. I received an answer earlier on how to rename the
active sheet to the value in the active cell. Now, I'm looking
for another variation.
 
Back
Top