Form Checkboxes won't enable via VBA

AndrewExcel

New Member
Joined
Nov 17, 2015
Messages
3
Hello

My aim is, from a user perspective, to double click on a control to enable it for editing. I do this by double clicking on a locked control which makes visible and on top an identical control. When that is edited I then save that back to the spreadsheet. This has worked fine for me to date, until I try to use it on checkboxes. With the checkboxes I cannot select the boxes to double click on them. The code and set up for all components is identical.

I have a number of different of components on the form, list boxes, combo boxes and checkboxes.

Each is set at start-up to to be Locked = TRUE, Visible = TRUE , Enabled = FALSE.

On a specific action the following code below referencing these components is implemented. frmProductBuilder.PartColumnValue11 to frmProductBuilder.PartColumnValue14 refer to the chewckboxes.

Here is the code. Anyone any idea?

Regards

Andrew


First populate:
frmProductBuilder.PartColumnValue2.Value = SheetName.Range("B" & rng1.Row)
frmProductBuilder.PartColumnValue3.Value = SheetName.Range("C" & rng1.Row)
frmProductBuilder.PartColumnValue4.Value = SheetName.Range("D" & rng1.Row)
frmProductBuilder.PartColumnValue5.Value = SheetName.Range("E" & rng1.Row)
frmProductBuilder.PartColumnValue6.Value = SheetName.Range("F" & rng1.Row)
frmProductBuilder.PartColumnValue7.Value = SheetName.Range("G" & rng1.Row)
frmProductBuilder.PartColumnValue8.Value = SheetName.Range("H" & rng1.Row)
frmProductBuilder.PartColumnValue9.Value = SheetName.Range("I" & rng1.Row)
frmProductBuilder.PartColumnValue10.Value = SheetName.Range("J" & rng1.Row)
frmProductBuilder.PartColumnValue11.Value = SheetName.Range("K" & rng1.Row)
frmProductBuilder.PartColumnValue12.Value = SheetName.Range("L" & rng1.Row)
frmProductBuilder.PartColumnValue13.Value = SheetName.Range("M" & rng1.Row)
frmProductBuilder.PartColumnValue14.Value = SheetName.Range("N" & rng1.Row)
frmProductBuilder.PartColumnValue15.Value = SheetName.Range("O" & rng1.Row)

Then enable:
PartColumnValue2.Enabled = True​
PartColumnValue3.Enabled = True​
PartColumnValue4.Enabled = True​
PartColumnValue5.Enabled = True​
PartColumnValue6.Enabled = True​
PartColumnValue7.Enabled = True​
PartColumnValue8.Enabled = True​
PartColumnValue9.Enabled = True​
PartColumnValue10.Enabled = True​
PartColumnValue11.Enabled = True
PartColumnValue12.Enabled = True
PartColumnValue13.Enabled = True
PartColumnValue14.Enabled = True
PartColumnValue15.Enabled = True​
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Where are these checkboxes located?
 
Upvote 0
Mmm ... Just discovered that even though I can't select the checkboxes they are enabled. The Following code, as the very last line of the procedure, reports "TRUE TRUE TRUE TRUE"

MsgBox PartColumnValue3.Enabled & " " & PartColumnValue3.Locked & " " & PartColumnValue11.Enabled & " " & PartColumnValue11.Locked
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,845
Members
449,471
Latest member
lachbee

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