LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default For... Next


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


--
Sylvian
------------------------------------------------------------------------
Sylvian's Profile: http://www.excelforum.com/member.php...o&userid=26730
View this thread: http://www.excelforum.com/showthread...hreadid=401819

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"