By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,646 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,646 IT Pros & Developers. It's quick & easy.

Name a Worksheet from clipboard?

P: 2
Hi, all.
I am new to all this. Played in xl some, enjoyed it. still playing. I want to enter text into 2 adjacent cells in one worksheet, then copy a template worksheet and name it the 2-cell text (first and last names). I can do the template copy, data entry, and rename by hand, but not by code. I think maybe naming the 2-cell section, then referencing the name in renaming the worksheet, but I can't figure out how to do this. I'm sorry if this has already been addressed. I looked, but didn't find any threads on it. If so, please redirect me. Thanks,
Alamo
Nov 14 '06 #1
Share this Question
Share on Google+
4 Replies


Expert 5K+
P: 8,434
Hi, all.
I am new to all this. Played in xl some, enjoyed it. still playing. I want to enter text into 2 adjacent cells in one worksheet, then copy a template worksheet and name it the 2-cell text (first and last names). I can do the template copy, data entry, and rename by hand, but not by code. I think maybe naming the 2-cell section, then referencing the name in renaming the worksheet, but I can't figure out how to do this. I'm sorry if this has already been addressed. I looked, but didn't find any threads on it. If so, please redirect me. Thanks,
Alamo
Which part specifically is giving you the trouble?

You can just reference the sheet name and change it (for example Sheets("Sheet2").Name = MyValue).

Can't remember right now how to grab the cell values, sorry. Probably someone else will help further.
Nov 14 '06 #2

P: 2
Which part specifically is giving you the trouble?

You can just reference the sheet name and change it (for example Sheets("Sheet2").Name = MyValue).

Can't remember right now how to grab the cell values, sorry. Probably someone else will help further.
Thank you. I am using a text box to enter a name in a worksheet. I then want to use this same name to create a new worksheet. Actully, it is a copy of a template that I need to rename. I have other things that I need to do with this same name, but I seem to be stumped at the worksheet. I can name it from a text box, but then I can't use the name for other things without reentering it as a data string. Any suggestions would be appreciated. Thanks
Nov 16 '06 #3

100+
P: 267
Thank you. I am using a text box to enter a name in a worksheet. I then want to use this same name to create a new worksheet. Actully, it is a copy of a template that I need to rename. I have other things that I need to do with this same name, but I seem to be stumped at the worksheet. I can name it from a text box, but then I can't use the name for other things without reentering it as a data string. Any suggestions would be appreciated. Thanks
hi

if you stored the value of this textbox as a variable ?
Nov 18 '06 #4

Expert 5K+
P: 8,434
Thank you. I am using a text box to enter a name in a worksheet. I then want to use this same name to create a new worksheet. Actully, it is a copy of a template that I need to rename. I have other things that I need to do with this same name, but I seem to be stumped at the worksheet. I can name it from a text box, but then I can't use the name for other things without reentering it as a data string. Any suggestions would be appreciated. Thanks
Sorry, but I'm having difficulty in understanding what you're trying to do.

However, it sounds as though in your VB code, you need to create a global (Public) variable and place the name in that, so you can use it later.
Nov 19 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.