Making a userform checkbox view a chechmark if value = "X" in works sheet

KiraJensen

New Member
Joined
May 16, 2018
Messages
8
Hi

I'm trying to make a checkbox within a userform that can view the checkbox as checked off, depeding on there being a "X" ind the B column of the worksheet.

I found this code:

Private Sub Userform_Activate()
If [B1] = "X" Then
Me.Checkbox1 = True
Else
Me.Checkbox1=False
End If
End Sub

The code works just fine, but I'm in need of it being dynamic, so I can look up if there is a X in the entire B column, depending on which line in B column I'm looking up?

For me to look up the individual columns i have autogenerated ID Numbers in column A, where i have created a dynamic dropdown menu with all these numbers in.

Is it possible to make the userform look at the value in ComboBox_ID, for the userform to know which line it has to look at and set the checkbox 1 = true / False depending on there being a "X" in column B without me having to write the code staded above for the individual rows in column B?

Hope someone is able to help me with this due to me having 92 rows of information, and there being constantly added information to the worksheet.


Thanks in advance!
- Kira
 
Hi,
If you are using the code as posted, then it does not show the update I provided in #post 6 to manage numeric values in your range

Rich (BB code):
m = Application.Match(Val(Me.ComboBox_ID.Value), ws.Columns(1), 0)

add code shown in RED & see if this resolves the issue.

Dave
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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