I think I misunderstood your question , you can use this macro :

 

Private Sub Workbook_Open()

    Dim wksSheet As Worksheet

    For Each wksSheet In Me.Worksheets

        If wksSheet.Name = "Result" Then

            wksSheet.Copy ,
ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count)

            ThisWorkbook.Worksheets(ThisWorkbook.Worksheets.Count).Name =
"Result_" & ThisWorkbook.Worksheets.Count - 1

            Exit Sub

        End If

    Next wksSheet

End Sub

 

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: Rajan_Verma [mailto:rajanverma1...@gmail.com] 
Sent: 07 June 2012 8:28
To: 'excel-macros@googlegroups.com'
Subject: RE: $$Excel-Macros$$ Need Help - To rename the sheet

 

Use this:

 

Private Sub Workbook_Open()

    Dim wksSheet As Worksheet

    For Each wksSheet In Me.Worksheets

        If wksSheet.Name Like "Result*" Then

        wksSheet.Name = "Result_" &
Val(WorksheetFunction.Substitute(wksSheet.Name, "Result_", "")) + 1

        End If

    Next wksSheet

End Sub

 

 

Regards

Rajan verma

+91 7838100659 [IM-Gtalk]

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Mangesh Dayne
Sent: 07 June 2012 8:17
To: excel-macros@googlegroups.com; Mangesh Dayne
Subject: $$Excel-Macros$$ Need Help - To rename the sheet

 

Hi Friends,

 

I came across good scenario while working in excel.

I have the worksheet named "Result" which contain important data and
whenever I open the file I need this Result sheet should become Result_1
automatically, so that there should not be Result sheet available in
workbook. If I open the file again it should be rename Result_2 then
Result_3 like this. In this way I will work on result sheet and all previous
file would become Result_1, Result_2, Result_3, Result_4, etc. 

Please help me by providing suitable code. And also tell me where I have to
put this code.

 

Appreciate your help for this !!!

 

Mangesh.

-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com
 
To unsubscribe, send a blank email to
excel-macros+unsubscr...@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com

Reply via email to