ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating a New Macro (https://www.excelbanter.com/excel-discussion-misc-queries/182472-creating-new-macro.html)

SharonJo

Creating a New Macro
 
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?

Jim Cone

Creating a New Macro
 

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?


All times are GMT +1. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com