CHANGE WORKSHEET TAB NAME WITH INPUTBOX

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Drmwvr7266

Board Regular
Joined
Apr 7, 2002
Messages
164
I have used a Userform just for this purpose. I have a commandbutton that runs a macro similar to this:


Sub Rename()
Sheets("Sheet1").Select
Sheets("Sheet1").Name= Userform1.textbox1.value
End Sub
 

Jay Petrulis

MrExcel MVP
Joined
Mar 17, 2002
Messages
2,040
Hi,

<pre>Sub test()

ActiveSheet.Name = _
Application.InputBox(Prompt:="Enter a worksheet name", Type:=2)

End Sub</pre>

Note that this has no error checking.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,018
Messages
5,569,646
Members
412,285
Latest member
Daibear
Top