Suggestion

I

IGFET909

How about the creation of a new worksheet, and the title of its tab, all in
one smooth step, instead of in two steps? This would make worksheet creation
a lot simpler without the necessity of renaming the tab as you would want it
to be in the first instance.

Thanks!
 
G

Gord Dibben

Which psychic function of Excel would you suggest name/title the tab when new
sheet is created?


Gord Dibben MS Excel MVP
 
D

Dave Peterson

Just a guess, but I bet that the OP wanted a small form that would open the
Rename dialog and add it at the same time.

Kind of like this as a macro:

Option Explicit
Sub testme()

Dim myNewName As String
Dim wks As Worksheet

myNewName = InputBox(Prompt:="What's the new name")
If myNewName = "" Then
Exit Sub
End If

Set wks = Worksheets.Add
On Error Resume Next
wks.Name = myNewName
If Err.Number <> 0 Then
MsgBox "Invalid Name! Do it yourself."
Err.Clear
End If
On Error GoTo 0

End Sub


If the OP is new to macros, then the OP can read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
I

IGFET909

Thank you Gentlemen:

This request is sort of futuristic (which does not mean that MS is not
working on it). What I'm suggesting is merely what would be, for at least
this user, the next logical step when it comes to creation of a new worksheet.

As it currently stands there are two steps: (1) You create the worksheet.
(2) You rename the tab.

What I'm proposing is a one-step operation (and I'm not suggesting that it's
possible to do at this point with respect to Office Word 2003). The idea is,
in one step: (1) When you copy/create a new worksheet, you are, at that same
instance, able to name that worksheet whatever you want it to be.

In other words, combine two steps into one. That would save time and
effort. It seems like a reasonable expectation. It does not require any
"psychic" energy. It requires a more streamlined approach to
creating/copying a worksheet.

Thanks.
 
B

Biff

Seems logical. So, don't hold your breath!

Biff

IGFET909 said:
Thank you Gentlemen:

This request is sort of futuristic (which does not mean that MS is not
working on it). What I'm suggesting is merely what would be, for at least
this user, the next logical step when it comes to creation of a new
worksheet.

As it currently stands there are two steps: (1) You create the worksheet.
(2) You rename the tab.

What I'm proposing is a one-step operation (and I'm not suggesting that
it's
possible to do at this point with respect to Office Word 2003). The idea
is,
in one step: (1) When you copy/create a new worksheet, you are, at that
same
instance, able to name that worksheet whatever you want it to be.

In other words, combine two steps into one. That would save time and
effort. It seems like a reasonable expectation. It does not require any
"psychic" energy. It requires a more streamlined approach to
creating/copying a worksheet.

Thanks.
 
G

Gord Dibben

Have a look at Dave P's macro which allows you to type the name into an inputbox
and create the sheet based on that.

Still requires manual intervention and more than one step to execute.

1. Click on a button or invoke the macro from a shortcut key combo.

2. Input the name.

3. Click OK or hit <ENTER> key on the dialog box.


Gord
 
Top