LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I require data entry in a combo box in Excel?


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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Require an entry in a cell Erika Excel Discussion (Misc queries) 3 September 25th 09 09:15 PM
Data Validation- Require Entry in a Field KrispyData Excel Discussion (Misc queries) 1 May 22nd 09 05:34 AM
Require data entry in column before moving to next cell [email protected] Excel Programming 1 April 27th 08 02:39 PM
How do I require data entry in a cell before moving to the next ce CindyB Excel Worksheet Functions 3 April 26th 08 04:18 PM
Require cell entry Bernie Deitrick Excel Programming 0 June 24th 04 02:43 PM


All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"