Finding and Replacing Sheet Names

A

Akash

Hello to everybody, (and Happy Thanksgiving!)

A workbook has multiple sheets like

GGN - Apr'12,
GGN - May-12,
GGN - Jun-12,
GGN - Jul-12,
GGN - Aug-12

and it continue till GGN - Mar-13.


I would like to change all the GGN to DDN

How??

Thanks

Rgds

Akash Maheshwari
 
G

GS

Try...

Sub RenameSheets()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.Name = Replace(wks.Name, "GGN", "DDN", , 1)
Next 'wks
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

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