Changing Worksheet Names via VBA

H

haas786

Hey all,

Is there a way to change the name of the worksheet via VBA code? I
could do it using a recorded macro, but the extra step I need is to
automate the name change. In cell A6 I have a name which I'd like to
use as the name for the sheet. So, when a macro runs, in addition to
all the tasks it's supposed to perform, it will rename the sheet with
whatever value is in cell A6.

Thanks for yourhelp in advance!
 
B

Bob Phillips

With Activesheet
.Name = .Range("A6").Value
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
H

haas786

With Activesheet
.Name = .Range("A6").Value
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)








- Show quoted text -

Thanks - that worked! Truly appreciate the help!
 

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