Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy and insert name on tab

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy and insert name on tab

On Mar 1, 11:47 am, "Don Guillett" wrote:
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- Hide quoted text -


- Show quoted text -


Once I enter the tab name can I get it to be entered into a specific
cell on that worksheet too. For example the tab names are going to be
loan numbers and on my worksheet there is a field (cell g13) that
needs to be entered for loan number too. I do not know if that is
possible or not.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Copy and insert name on tab

try adding another line. There are other ways to do this.

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

Sheets(1).range("a1").value=sheets(1).name

End Sub



--
Don Guillett
SalesAid Software

"Maggie" wrote in message
s.com...
On Mar 1, 11:47 am, "Don Guillett" wrote:
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- Hide quoted text -


- Show quoted text -


Once I enter the tab name can I get it to be entered into a specific
cell on that worksheet too. For example the tab names are going to be
loan numbers and on my worksheet there is a field (cell g13) that
needs to be entered for loan number too. I do not know if that is
possible or not.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy and insert name on tab

On Mar 1, 5:31 pm, "Don Guillett" wrote:
try adding another line. There are other ways to do this.

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


Sheets(1).range("a1").value=sheets(1).name

End Sub



--
Don Guillett
SalesAid Software
"Maggie" wrote in message

s.com...



On Mar 1, 11:47 am, "Don Guillett" wrote:
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- Hide quoted text -


- Show quoted text -


Once I enter the tab name can I get it to be entered into a specific
cell on that worksheet too. For example the tab names are going to be
loan numbers and on my worksheet there is a field (cell g13) that
needs to be entered for loan number too. I do not know if that is
possible or not.- Hide quoted text -


- Show quoted text -


That worked! Thanks! Is there a limit on the number of tabs that
excel can handle. I have 50-60 loans that need to be input into 50-60
worksheets using the same macros. I have to use excel because that is
what my boss wants. Is that possible?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Copy and insert name on tab

On Mar 1, 11:25 am, Gary''s Student
wrote:
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- Hide quoted text -


- Show quoted text -


Thank you so much it worked! I can't believe it was so simple!

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Copy and insert name on tab

Guillett's post is even better.
--
Gary''s Student
gsnu200708


"Maggie" wrote:

On Mar 1, 11:25 am, Gary''s Student
wrote:
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- Hide quoted text -


- Show quoted text -


Thank you so much it worked! I can't believe it was so simple!


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Copy and insert name on tab

I used a learn macro and then made appropriate changes. this works.

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 3/1/2007

'
newname = InputBox("enter sheet name")
Sheets("ABC").Select
Sheets("ABC").Name = newname
End Sub


"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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and insert dee Excel Discussion (Misc queries) 0 April 8th 08 11:30 AM
Copy and paste versus copy and insert copied cells Alana New Users to Excel 1 September 28th 07 08:58 PM
Move/Copy or Copy/Insert worksheet? kjk Excel Discussion (Misc queries) 0 December 15th 06 02:40 PM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Copy & Insert from another xls JWF Excel Discussion (Misc queries) 1 March 14th 06 12:08 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"