Force users to populate certain field before continuing

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
829
Office Version
  1. 365
Platform
  1. Windows
I have a combo box in a form with several choices. It is possbile to make the entire form locked down until a selection is made from that combo box?

Also I would like to know how to make the combo box locked after a selection so that a user cannot change their combo box selection if they were to edit the record.

Thanks,
Matthew
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
you could add a sub to Enable/Diable controls and call it from the afterUpdate event of the combo and, probably, the current event of the form

Code:
Sub LockUp(bolLock As Boolean)
Dim ctl As Control
On Error Resume Next
For Each ctl In Me.Controls
   If ctl.ControlName = "MyCombo" Then
      ctl.Enabled = bolLock + 1
   Else
      ctl.Enabled = bolLock
   End If
Next ctl
End Sub

HTH

Peter
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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