ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to use VBA to name sheets ? (https://www.excelbanter.com/excel-programming/368293-how-use-vba-name-sheets.html)

vumian[_14_]

how to use VBA to name sheets ?
 

I have a file that i do not know how many sheet are there in before

i need to copy contain of C4 to name of sheets

Thank for your help

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=56478


Tom Ogilvy

how to use VBA to name sheets ?
 
Sub Renamesheets()
dim sh as Worksheet
for each sh in workbook.Worksheets
sh.name = sh.Range("C4").Value
Next
end Sub


would be my guess of what you want

--
Regards,
Tom Ogilvy


"vumian" wrote:


I have a file that i do not know how many sheet are there in before

i need to copy contain of C4 to name of sheets

Thank for your help.


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=564788




All times are GMT +1. The time now is 05:19 PM.

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