PDA

View Full Version : [SOLVED:] Change worksheet name according to cell



jacksonworld
09-11-2005, 04:47 PM
Hi,

I have request for someone out there. I was wanting to create a macro to change the worksheet name to the text in A1. That's all.

It would be grateful for any assistance.

Thanks

mvidas
09-11-2005, 04:53 PM
Hi jacksonworld, welcome to VBAX :)

If you're wanting to change the activesheet's name, you could use


ActiveSheet.Name = Range("A1").Text


If you're wanting to change a specific sheet's name based on the A1 of a sheet, you would use


Sheets("Sheet Name").Name = Sheets("Sheet Name").Range("A1").Text


Matt

jacksonworld
09-11-2005, 05:53 PM
Thanks for prompt reply. Problem solved :thumb