Dear experts
I have attached my file, for renaming sheet with adding one sheet (1001) only
at once click
when we press once command button only one sheet should be created as name 1001
again when i press second time press that button second sheet should be created
as name 1002 and so on.
try this
Option Compare Text
Sub test()
Dim i As Long
Dim swa As Boolean
Dim ws As Worksheet
Sheets(1).Select
For i = 2 To Sheets(1).Range(a2).End(xlDown).Row
swa = False
For Each ws In ThisWorkbook.Sheets
If Sheets(1).Range(a i).Value = ws.Name Then
swa = True
Exit For
End If
Next ws
If
Dears
I have enclosed a simple file with my problem plz help me in my project.
awaiting your positive responce
Sajid Memon
--
--
Some important links for excel users:
1.
@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de SAJID MEMON
Envoyé : dimanche 10 juillet 2011 18:53
À : Excel Group
Objet : $$Excel-Macros$$ Rename Sheet as datawise How?
Dears
I have enclosed a simple file with my problem plz help me in my project.
awaiting your
Hi
Try
Sub test()
Dim i As Long
Dim ws As Worksheet
Dim LR As Long
LR = Range(A Rows.Count).End(xlUp).Row
For i = 2 To LR
Set ws = Worksheets.Add(After:=Sheets(Sheets.Count))
ws.Name = Sheets(sheet1).Cells(i, 1)
Next i
End Sub
On Sun, Jul 10, 2011 at 10:23 PM, SAJID MEMON
Sent: Sunday, July 10, 2011 10:23 PM
To: Excel Group
Subject: $$Excel-Macros$$ Rename Sheet as datawise How?
Dears
I have enclosed a simple file with my problem plz help me in my project.
awaiting your positive responce
Sajid Memon