Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Looping through checkboxes

I have a macro that has a pair of loops in it. I have inserted checkboxes
into the sheet to enable the user to skip certain lines when the macro runs.
The problem is I have Checkbox1, checkbox2, and so on.

For myLine = 1 To 5

If Sheet1.Checkbox1 = True Then

myPath = dirPath & ... & mySheet & "'!E24"

ActiveCell.Value = "='" & myPath

Cells(ActiveCell.Row + 1, 2).Select

Else

Cells(ActiveCell.Row + 1, 2).Select

End If

Next myLine

I want to use the "myLine" counter in the loop to check each checkbox for
the True condition.

I am sure there is a simple way, I just cannot seem to figure it out. Any
help would be appreciated. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Looping through checkboxes

I was able to get it, please disregard. Thanks!

"TomK76" wrote:

I have a macro that has a pair of loops in it. I have inserted checkboxes
into the sheet to enable the user to skip certain lines when the macro runs.
The problem is I have Checkbox1, checkbox2, and so on.

For myLine = 1 To 5

If Sheet1.Checkbox1 = True Then

myPath = dirPath & ... & mySheet & "'!E24"

ActiveCell.Value = "='" & myPath

Cells(ActiveCell.Row + 1, 2).Select

Else

Cells(ActiveCell.Row + 1, 2).Select

End If

Next myLine

I want to use the "myLine" counter in the loop to check each checkbox for
the True condition.

I am sure there is a simple way, I just cannot seem to figure it out. Any
help would be appreciated. Thanks!

Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping Checkboxes in Worksheet Lin Excel Programming 3 November 12th 08 09:44 PM
Looping through a group of checkboxes asdfasdf Excel Programming 9 October 13th 05 02:04 AM
Looping Checkboxes on Worksheet Robbyn Excel Programming 2 August 7th 05 09:09 PM
Checkboxes to spreadsheet using a looping macro Eddie[_5_] Excel Programming 0 September 8th 04 11:04 AM
Looping checkboxes embedded in worksheet Theresa[_5_] Excel Programming 1 February 27th 04 04:41 AM


All times are GMT +1. The time now is 11:00 AM.

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

About Us

"It's about Microsoft Excel"