Creating a New Macro

S

SharonJo

OK, so I have this maco to name a tab to the contents of cell A1, but I have
no idea what to do with the macro...

Sub name_um()
For Each ws In Worksheets
ws.Name = ws.Range("A1").Value
Next
End Sub

....and can I save the macro so that I can use it in other workbooks?
 
J

Jim Cone

I think Ron de Bruin does a pretty good job of explaining it.
(but I already know how to ride the bicycle <g> - you will have to be the judge)
Try here... http://www.rondebruin.nl/code.htm
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"SharonJo"
wrote in message
OK, so I have this maco to name a tab to the contents of cell A1, but I have
no idea what to do with the macro...

Sub name_um()
For Each ws In Worksheets
ws.Name = ws.Range("A1").Value
Next
End Sub

....and can I save the macro so that I can use it in other workbooks?
 

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