User Form Check Box Data Entry Multi Options

raccoon588

Board Regular
Joined
Aug 5, 2016
Messages
118
I have a user form with three options. I need to be able to select 1 of the options, two of them, or all three. i have the following code but if the first if statement is not true it does not work at all. how do i get it to allow for any selection combination at any time to work?



Code:
Private Sub CmdSubmit_Click()


Dim c As Range
If ChkPlantManager Then
Set c = Range("A5:A9999").Find(Date).Offset(1, 24)
If Not c Is Nothing Then c.Select
ActiveCell.Value = "Plant Manager"
If ChkPLM Then
Set c = Range("A5:A9999").Find(Date).Offset(2, 24)
If Not c Is Nothing Then c.Select
ActiveCell.Value = "Plant Line Manager"
If ChkForeman Then
Set c = Range("A5:A9999").Find(Date).Offset(3, 24)
If Not c Is Nothing Then c.Select
ActiveCell.Value = "Foreman"
End If
End If
End If
End Sub
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try
Code:
Private Sub CmdSubmit_Click()


Dim c As Range
If ChkPlantManager Then
   Set c = Range("A5:A9999").find(Date).Offset(1, 24)
   If Not c Is Nothing Then c.Select
   activecell.Value = "Plant Manager"
End If
If ChkPLM Then
   Set c = Range("A5:A9999").find(Date).Offset(2, 24)
   If Not c Is Nothing Then c.Select
   activecell.Value = "Plant Line Manager"
End If
If ChkForeman Then
   Set c = Range("A5:A9999").find(Date).Offset(3, 24)
   If Not c Is Nothing Then c.Select
   activecell.Value = "Foreman"
End If
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,086
Messages
6,128,734
Members
449,466
Latest member
Peter Juhnke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top