Renaming a sheet

D

Darin Kramer

Howdie,

Basic VBA for renaming a sheet with value in cell e1 is:
ActiveSheet.Name = Range("e1").Value

Two sitns I want to:
a) rename sheet with say e1 and f1, and for a different sheet
b) rename sheet with e1 and the word test

any ideas..?

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***
 
P

Paul B

Darin, try this,

ActiveSheet.Name = Sheets("Sheet2").Range("E1") & _
Sheets("Sheet2").Range("F1")


ActiveSheet.Name = Sheets("Sheet2").Range("E1") & " test"


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
B

Bob Phillips

ActiveSheet.Name = Range("e1").Value & Range("F1").Value

ActiveSheet.Name = Range("e1").Value & "test"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top