Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to require a selection from a combo box in a form in Excel before
the form is saved. (Also with a msg box) What's the best way to do this? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Place this code in your save button, make sure the control names match yours Code: -------------------- Option Explicit Private Sub CommandButton1_Click() With Me If .ComboBox1.ListIndex - 0 Then MsgBox "You must select from the dropdown list", vbCritical, "Input required" .ComboBox1.SetFocus Exit Sub Else: 'your save code here End If End With End Sub -------------------- -- royUK Hope that helps, RoyUK For tips & examples visit my 'web site ' (http://www.excel-it.com) ------------------------------------------------------------------------ royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=29624 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Require an entry in a cell | Excel Discussion (Misc queries) | |||
Data Validation- Require Entry in a Field | Excel Discussion (Misc queries) | |||
Require data entry in column before moving to next cell | Excel Programming | |||
How do I require data entry in a cell before moving to the next ce | Excel Worksheet Functions | |||
Require cell entry | Excel Programming |