View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Copy and insert name on tab

And maybe take one out
Sub maggie()
Sheets("HOEPA Worksheet").Copy Befo=Sheets(1)
Sheets(1).Name = Application.InputBox("enter tabname", 2)
End Sub

--
Don Guillett
SalesAid Software

"Gary''s Student" wrote in message
...
one extra line:

Sub maggie()
Sheets("HOEPA Worksheet").Select
Sheets("HOEPA Worksheet").Copy Befo=Sheets(1)
Sheets(1).Name = Application.InputBox("enter tabname", 2)
End Sub

--
Gary's Student
gsnu200708


"Maggie" wrote:

I already have the macro to copy my worksheet which is:
Sheets("HOEPA Worksheet").Select
Sheets("HOEPA Worksheet").Copy Befo=Sheets(1).

I want to be able to name the tab using a input box but I cant seem to
get it to work. Any suggestions on how to go about this so that when
I hit the button to copy and insert an input box would come and ask to
enter the name of the tab.

Maggie