×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Checkbox sends program to other VBA form

Checkbox sends program to other VBA form

Checkbox sends program to other VBA form

(OP)
I have a program that prints out a series of drawings. Since the user may want to only select a few of the available drawings, I have a checkbox that displays another form. This form lists checkboxes for all of the drawings with the checkbox caption being the drawing name. In order to have all of the checkboxes get checked or unchecked I have the following code.

Private Sub CheckBox1_Click()
For Each Control In Controls
    If Left$(Control.Name, 3) = "cbx" And Control.Caption <> "" Then
    If CheckBox1.Value = True Then Control.Value = True
    If CheckBox1.Value = False Then Control.Value = False
    End If
Next
End Sub

When I uncheck the boxes, it works great. When I check the boxes, it sends me back to the original form as if I have put frmPickDrawing.hide, frmMain.show.

Any idea what could make this happen?

RE: Checkbox sends program to other VBA form

Do you have any other code?  What about your before or after update options is there any code listed in them?  There has to be other code somewhere.


ck1999

RE: Checkbox sends program to other VBA form

(OP)
I have no idea why, but it is now working perfectly. Sorry for any inconvenience.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources