Dear Pravin,
Please try
Sub delete_alternative_sheet()
Dim i As Integer
On Error Resume Next
For i = 2 To Sheets.Count Step 2
Sheets(i).Delete
Next i
End Sub
On Thu, Nov 1, 2012 at 10:51 AM, Pravin Gunjal wrote:
> *Dear Friends,*
> *
> *
> *Greetings !*
> *
> *
> *I am having an excel file (o
*Dear Noorain*
*
*
*Pl inform how to and where to use this code..*
*Thank you.*
*
*
*Pravin.
*
On Thu, Nov 1, 2012 at 11:04 AM, NOORAIN ANSARI wrote:
> Dear Pravin,
>
>
> Please try
>
> Sub delete_alternative_sheet()
> Dim i As Integer
> On Error Resume Next
> For i = 2 To Sheets.Count Step 2
>
Dear Pravin,
Please press Alt+F11 and goto Insert-module and paste code
and press F5 to execute macro.
Hope it will useful for you.
On Thu, Nov 1, 2012 at 11:40 AM, Pravin Gunjal wrote:
> *Dear Noorain*
> *
> *
> *Pl inform how to and where to use this code..*
> *Thank you.*
> *
> *
> *Pravi
Dear Noorain Sir,
Can you ammend your code that when we run macro, a message box appear and
ask for select the sheets which you want to delete and we will select the
multiple sheet which we want to delete.
Aamir Shahzad
On Thu, Nov 1, 2012 at 11:34 AM, Pravin Gunjal wrote:
> *Dear Noorain*
> *I
*It would be better...
*
-- Forwarded message --
From: Aamir Shahzad
Date: Thu, Nov 1, 2012 at 12:13 PM
Subject: Re: $$Excel-Macros$$ How to delete alternate sheets faster
To: excel-macros@googlegroups.com
Dear Noorain Sir,
Can you ammend your code that when we run macro, a
l the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-
From: NOORAIN ANSARI
To: excel-macros@googlegroups.com
Sent: Thu, Nov
>
>
>
> If (Sheets.Count Mod 2 = 0) Then
> ShtCnt = Sheets.Count
> Else
> ShtCnt = Sheets.Count - 1
> End If
>
> for I = shtcnt to 2 step -2
>
>
>
>
>
> (the code would be best placed in a "Standard" module, or the Sheet1
> module)
>
>
>
> *Paul*
>
>
;
>> then you can use:
>>
>> For I = 42 to 2 step -2
>>
>>
>>
>> If you don't know the total number of sheets, you can use:
>>
>>
>>
>>
>> If (Sheets.Count Mod 2 = 0) Then
>> ShtCnt = Sheets.Count
>>
al
Sent: Thu, November 1, 2012 8:24:16 AM
Subject: Re: $$Excel-Macros$$ How to delete alternate sheets faster
Another way would be to create an array of sheet names and the delete it
accordingly.
So even if you go with a positive Step, it would still work.
Based on the suggestions above, you
Schreiner
Date: Thu, Nov 1, 2012 at 5:16 PM
Subject: Re: $$Excel-Macros$$ How to delete alternate sheets faster
To: excel-macros@googlegroups.com
That's not going to work out well.
Let's say you have 11 sheets
the Sheets() array looks like:
Sheets(1).Name = "One"
Sheets(2).N
.” - John Wesley
-
From: ANKUR AGGARWAL
To: "excel-macros@googlegroups.com"
Cc: "noorain.ans...@gmail.com"
Sent: Mon, November 5, 2012 6:33:01 AM
Subject: Re: $$Excel-Macros$$ How to delete alternate she
11 matches
Mail list logo