View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Brassman[_6_] Brassman[_6_] is offline
external usenet poster
 
Posts: 1
Default If Then Else with Exit For


Try fixing one more thing...

Code:
--------------------

Option Explicit

Sub TestValue()
Dim c As Range
Dim blnTest As Boolean

blnTest = False

For Each c In Range("C:C")
If blnTest = True Then Exit For
If IsNumeric(c) Then
c.EntireColumn.Visible = False
blnTest = True
End If
Next c
End Sub

--------------------

keep "c.EntireColumn.Visible (or Hidden)" on a separate line than "If
IsNumeric(c) Then"


--
Brassman
------------------------------------------------------------------------
Brassman's Profile: http://www.excelforum.com/member.php...o&userid=13290
View this thread: http://www.excelforum.com/showthread...hreadid=494489