View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Button to create a new tab

Aaron

How about no message box or Input Box? Also how about no button? Just
the Data Validation List. You can put instructions next to the Data
Validation cell telling the user to select from the list or type in the
name of a new client. The code will fire when he hits enter. If the entry
is not on the list, the entry will be put in the list in alphabetical order
and a new sheet will be created with that client's name as the sheet name,
the sheets will be sorted, and the new client's sheet will be selected.

You didn't say what you want to happen if the client selected is
on the list. I assume you want that client's sheet selected.

This will involve a series of macros (one big macro is
cumbersome) including a sheet macro. I will develop it for you and send you
the file. Attaching a file to a newsgroup post is a no-no, so I will email
it to you. Send me your email address. I'll probably have some questions
to ask you as I develop the code too. My email address is
. Remove the "nop" from this address. HTH Otto

"KnightRiderAW" wrote in message
...
I have a worksheet that some of our staff uses to input their hours into.
Under a client section, they have a list box that allows them to select
the
client they are working for. However, I want them to be able to add a new
client if it is not already listed.

I have a button at the bottom that they can click. What I wold like to
see
happen is have a Message Box pop up and ask them for the name of the new
client. When they hit OK, it adds the client to the list in alphabetical
order where the validation is pulled from (no more than 500 clients). On
top
of that, when they hit OK on the Message Box, Excel will actually create a
new tab at the bottom, cahnge the name of that tab to the client's name,
and
put it in alphabetical order with the other tabs aready in existance.

Any help would be appreciated. I am using Excel 2003 on Windows Server
2003. Thanks!

Aaron