LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default ListBox data validation

Hi there,

I have a userform with a listbox. I need to verify that the user has
selected an item from this listbox, and if not have a message appear to tell
them to do so.

I've written the following code:

'check for a Month/Year
If Me.ListBox2.Value = "" Then
msg = "Please enter Valid Date"
MsgBox msg
UserForm1.ListBox2.SetFocus
Exit Sub
End If

This code will work on a Textbox, but not a listbox. Any help would be
greatly appreciated!

JJ
 
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
Removing Data Validation (Listbox) NoodNutt Excel Worksheet Functions 6 March 8th 08 12:35 PM
Finding window handle of data validation listbox PastorMike[_2_] Excel Programming 2 August 18th 06 07:03 PM
Userform: listbox and controls' data entry validation sebastienm Excel Programming 2 September 15th 05 02:02 PM
Data Validation Listbox problem RASEnt Excel Programming 0 June 12th 05 11:47 PM
Change event for data validation listbox Steve Parkinson Excel Programming 4 January 14th 05 02:57 PM


All times are GMT +1. The time now is 06:38 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"