View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Copy and insert name on tab

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