Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default User input to name a sheet?

I must be asking for the wrong thing in the archives as nothing
pertinent to this is coming up. I'd like to be able to take user
input to name sheets copied from a hidden template.

What I mean is that right now workbook works well, user clicks button
in floating toolbar and a copy of the hidden template is made and I
then prompt user to change the tab name to something pertinent. We're
ready to move on and to instead have a message box come up to prompt
the user to enter a tab name that will then rename that new sheet.

Is there a way to do this?

Thanks. :oD

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User input to name a sheet?


??? dont know if i unerstand you, but something like this should work.


Code
-------------------

Sub renameWorksheet()
Dim NewName As String

NewName = InputBox("Give the tab a new name", "Rename")

If NewName = "" Then
NewName = InputBox("Go ahead, make my day, please, please", "Rename")
If NewName = "" Then Exit Sub
End If

ActiveSheet.Name = NewName

End Sub


-------------------

--
Pointles
-----------------------------------------------------------------------
Pointless's Profile: http://www.excelforum.com/member.php...fo&userid=3086
View this thread: http://www.excelforum.com/showthread.php?threadid=50811

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default User input to name a sheet?

PERFECT!!! It's my last day here in this contract so was just able to fix
up the macro. XL2K is too neat for words. They have a button that copies a
hidden template sheet and now also asks them for a name, all in one click!
Kewl.

Thanks! :oD

"Pointless" wrote
in message ...

??? dont know if i unerstand you, but something like this should work.


Code:
--------------------

Sub renameWorksheet()
Dim NewName As String

NewName = InputBox("Give the tab a new name", "Rename")

If NewName = "" Then
NewName = InputBox("Go ahead, make my day, please, please", "Rename")
If NewName = "" Then Exit Sub
End If

ActiveSheet.Name = NewName

End Sub


--------------------


--
Pointless
------------------------------------------------------------------------
Pointless's Profile:

http://www.excelforum.com/member.php...o&userid=30862
View this thread: http://www.excelforum.com/showthread...hreadid=508112



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
Relation betwn 2 sets of data, user to input one, sheet returns ot AndyB Excel Worksheet Functions 4 June 9th 07 09:29 AM
Moving data in one excel column to another sheet based on user input [email protected] Excel Discussion (Misc queries) 1 May 10th 07 05:47 PM
I would like to sort a work sheet based upon user input value,(dat John Bundy Excel Worksheet Functions 0 November 30th 06 04:18 PM
I would like to sort a work sheet based upon user input value,(dat A1CaddMan Excel Worksheet Functions 0 November 29th 06 03:53 PM
Help with Macro. -- User input for sheet name Michael A Excel Programming 9 January 6th 06 03:17 PM


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

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

About Us

"It's about Microsoft Excel"