S
Sylvian
Hello,
Does anybody of you know, how I can make the following "For… next"–
string?
This is how it is currently working:
val = Worksheet1.Range("h13").Value
If Worksheet1.Range("h13").Value = "x" Then
Worksheet1.CheckBox6.Value = True
Else
Worksheet1.CheckBox6.Value = False
End If
val = Worksheet1.Range("h14").Value
If Worksheet1.Range("h14").Value = "x" Then
Worksheet1.CheckBox7.Value = True
Else
Worksheet1.CheckBox7.Value = False
End If
This is I want to make it:
Dim iCounter As Integer
For iCounter = 8 To 38
val = Worksheet1.Cells(iCounter,1).Value
If Worksheet1. Cells(iCounter,1).Value = "x" Then
Worksheet1.CheckBox6(iCounter,1).Value = True
Else
Worksheet1.CheckBox6(iCounter,1).Value = False
End If
Does anybody of you know, how I can make the following "For… next"–
string?
This is how it is currently working:
val = Worksheet1.Range("h13").Value
If Worksheet1.Range("h13").Value = "x" Then
Worksheet1.CheckBox6.Value = True
Else
Worksheet1.CheckBox6.Value = False
End If
val = Worksheet1.Range("h14").Value
If Worksheet1.Range("h14").Value = "x" Then
Worksheet1.CheckBox7.Value = True
Else
Worksheet1.CheckBox7.Value = False
End If
This is I want to make it:
Dim iCounter As Integer
For iCounter = 8 To 38
val = Worksheet1.Cells(iCounter,1).Value
If Worksheet1. Cells(iCounter,1).Value = "x" Then
Worksheet1.CheckBox6(iCounter,1).Value = True
Else
Worksheet1.CheckBox6(iCounter,1).Value = False
End If