ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add new worksheet via userform (https://www.excelbanter.com/excel-programming/374315-add-new-worksheet-via-userform.html)

Bruise[_3_]

Add new worksheet via userform
 
Hello all.

I am trying to setup a script where I can use a form (Userform1) to fill in
an employee name and ID number, click the ADD button and create a new
worksheet with the employees name only?

I've searched this group for similiar topics, but not fit exactly as I need.

Any suggestions?

TIA

Mark



Nigel

Add new worksheet via userform
 
In its simplest form the add sheet will create a new sheet and activate it,
then name it using the string which could come from the control on the
userform.
e.g textbox1.value

Sheets.Add
ActiveSheet.Name = textbox1.value

--
Cheers
Nigel



"Bruise" wrote in message
...
Hello all.

I am trying to setup a script where I can use a form (Userform1) to fill
in
an employee name and ID number, click the ADD button and create a new
worksheet with the employees name only?

I've searched this group for similiar topics, but not fit exactly as I
need.

Any suggestions?

TIA

Mark





Susan

Add new worksheet via userform
 
in the beginning of your userform command code, you just need to insert

Worksheets.Add
ActiveSheet.Name = "xxxx"

:D
susan


Bob Phillips

Add new worksheet via userform
 
Worksheets.Add.Name = TextBox1.Value

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Bruise" wrote in message
...
Hello all.

I am trying to setup a script where I can use a form (Userform1) to fill

in
an employee name and ID number, click the ADD button and create a new
worksheet with the employees name only?

I've searched this group for similiar topics, but not fit exactly as I

need.

Any suggestions?

TIA

Mark






All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com