D
daved37
Hello,
How can I in VBA select a entire rows("number:number") where the cursor
is active...so when the cursor moves through my for next statement it
keeps on selecting the proper rows that I need it too and skipping the
others?
Here's my code so far:
Dim rng As Range
For Each rng In Range("B1:B150")
If rng = "" Then
rng.Activate
Rows("rng").Select ' Here is what doesn't work
Selection.Locked = False
Selection.FormulaHidden = False
Else
rng.Activate
Rows("rng").Select ' Here is what doesn't work
Selection.Locked = True
Selection.FormulaHidden = True
End If
Next
Thanks in advance!
Dave
How can I in VBA select a entire rows("number:number") where the cursor
is active...so when the cursor moves through my for next statement it
keeps on selecting the proper rows that I need it too and skipping the
others?
Here's my code so far:
Dim rng As Range
For Each rng In Range("B1:B150")
If rng = "" Then
rng.Activate
Rows("rng").Select ' Here is what doesn't work
Selection.Locked = False
Selection.FormulaHidden = False
Else
rng.Activate
Rows("rng").Select ' Here is what doesn't work
Selection.Locked = True
Selection.FormulaHidden = True
End If
Next
Thanks in advance!
Dave