ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto naming worksheets (https://www.excelbanter.com/excel-discussion-misc-queries/121849-auto-naming-worksheets.html)

Kenny R

Auto naming worksheets
 
In a Macro-as I copy and rename a worksheet, can I auto name the new
worksheet as a user entry in one of the cells of the worksheet?

Dave Peterson

Auto naming worksheets
 
Once you copy that worksheet, the new worksheet becomes the activesheet.

So after the copy...

with activesheet
.name = .range("a1").value '.text ???
end with

(No validation on that cell!)

Kenny R wrote:

In a Macro-as I copy and rename a worksheet, can I auto name the new
worksheet as a user entry in one of the cells of the worksheet?


--

Dave Peterson


All times are GMT +1. The time now is 06:01 PM.

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