Oh Ok I get it , I modify so it would exempt from the 2 tab........
Tom Ogilvy wrote:
> 2 is the second tab from the left - you said you didn't want to do anything
> to the first tab, which is 1. So it counts down from the rightmost tab to
> the left. (assuming you have a version of excel that works from left to
> right).
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Ardy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > So Is 2 the first tab or the last tab, or How would one determine that
> >
> > Thanks.......
> >
> > Tom Ogilvy wrote:
> >> it counts backwards.
> >>
> >> --
> >> Regards,
> >> Tom Ogilvy
> >>
> >>
> >> "Ardy" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Tom
> >> > Thank you.......can You educate me on one thing. Not being a
> >> > programmer but familiar woth the concepts I fallow all of the logic but
> >> > get lost in
> >> >
> >> > For i = Sheets.Count To 2 Step -1
> >> >
> >> > I undrestand the For statement but don't quit get the 2 step -1, can
> >> > you shed some light on this......
> >> >
> >> > Regards
> >> > Ardy
> >> >
> >> >
> >> > Tom Ogilvy wrote:
> >> >> Sub ABCD()
> >> >> Dim i As Long
> >> >> Application.DisplayAlerts = False
> >> >> For i = Sheets.Count To 2 Step -1
> >> >> Sheets(i).Delete
> >> >> Next
> >> >> Application.DisplayAlerts = True
> >> >>
> >> >> End Sub
> >> >>
> >> >>
> >> >> --
> >> >> Regards,
> >> >> Tom Ogilvy
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> "Ardy" <(E-Mail Removed)> wrote in message
> >> >> news:(E-Mail Removed)...
> >> >> > If I create 5 tabs based on some variables in one other tab, how
> >> >> > would
> >> >> > I delete the created tabs.
> >> >> > i.e
> >> >> > I have TAB 1, in this tab I have code (Thanks to this group) I will
> >> >> > create TAB 2, 3, 4, 5. The numbers of tabs are unknown it depends
> >> >> > on
> >> >> > the list on tab 1. I need to delete tab 2, 3, 4, 5 but not 1. So
> >> >> > the
> >> >> > code I assume needs to make a list of all existing tabs have an
> >> >> > exception not to delete 1 and delete the rest.
> >> >> >
> >> >> > Ardy
> >> >> >
> >> >
> >
|