Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about looping
What I want to do is to put the following two lines in a loop. shtFixD.Rows("FixedFooter" & i).Delete ActiveWorkbook.Names("FixedFooter" & i).Delete Where I know the numbers start with 1 and increment by one. What I don't know is how many "Footers" I have. How can I do this?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about looping
What is FixedFooter? What is i? I would normally expect a loop to identify a
key column, and identify the last row of that, and loop until the end of that. -- __________________________________ HTH Bob "Brad" wrote in message ... What I want to do is to put the following two lines in a loop. shtFixD.Rows("FixedFooter" & i).Delete ActiveWorkbook.Names("FixedFooter" & i).Delete Where I know the numbers start with 1 and increment by one. What I don't know is how many "Footers" I have. How can I do this?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about looping
This should be close to what you want...
Sub DeleteStuff() Dim nme As Name For Each nme In ThisWorkbook.Names With nme If LCase(Left(.Name, 11)) = "fixedfooter" Then .RefersToRange.EntireRow.Delete .Delete End If End With Next nme End Sub -- HTH... Jim Thomlinson "Brad" wrote: What I want to do is to put the following two lines in a loop. shtFixD.Rows("FixedFooter" & i).Delete ActiveWorkbook.Names("FixedFooter" & i).Delete Where I know the numbers start with 1 and increment by one. What I don't know is how many "Footers" I have. How can I do this?? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about looping
Thank you!!
-- Wag more, bark less "Jim Thomlinson" wrote: This should be close to what you want... Sub DeleteStuff() Dim nme As Name For Each nme In ThisWorkbook.Names With nme If LCase(Left(.Name, 11)) = "fixedfooter" Then .RefersToRange.EntireRow.Delete .Delete End If End With Next nme End Sub -- HTH... Jim Thomlinson "Brad" wrote: What I want to do is to put the following two lines in a loop. shtFixD.Rows("FixedFooter" & i).Delete ActiveWorkbook.Names("FixedFooter" & i).Delete Where I know the numbers start with 1 and increment by one. What I don't know is how many "Footers" I have. How can I do this?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looping question | Excel Discussion (Misc queries) | |||
Looping Question | Excel Programming | |||
Looping question | Excel Programming | |||
Looping Question | Excel Programming | |||
Looping Question | Excel Programming |