View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Loop help please!


Dim i As Long
With Worksheets("sheet2")
For i = 1 To 50
.OLEObjects("TextBox" & i).Visible = _
.Range("A" & 10 + 1).Interior.ColorIndex = 3
Next i
End With

This compares Textbix1 with A11, 2 with A12, etc.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Rick_Stanich"
wrote in message
news:Rick_Stanich.23wtta_1141080601.9758@excelforu m-nospam.com...

I just dont quite grasp Loops yet. :sigh:
Mainly because I rarely need them.
Any how, I'm stuck so to speak, I have 60 TextBox's to iterate thru and
check a condition, how do I complete this?

For code, all i have is the first textbox.

"If Worksheets("sheet2").Range("a10").Interior.ColorIn dex = 3 Then
TextBox14.Visible = False
End If"


--
Rick_Stanich

I am me
------------------------------------------------------------------------
Rick_Stanich's Profile:

http://www.excelforum.com/member.php...o&userid=28957
View this thread: http://www.excelforum.com/showthread...hreadid=517055