Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have created a user form to update the balanaces in the accounts. User can pick the dates, which are user can choose by a combox box and update accordingly. I want to have a validation check for the date so that the user are not allowed to pick dates which have balances already attached to them. I tried creating the following but its not working. I am new to VBA so if someone can help me move in the right direction that would be really helpful. --------------------------------------------------- Private Sub cmblist_Change() DateCheck End Sub ---------------------------------------------------- Private Sub DateCheck() If cmblist.Value < Sheets("CDN").Range("DateDBCDN") Then ' DateDBCDN is the range where the dates are posted from the user form. msg = "Data for this date is already posted" Sheets("Main").Select Range("A2").Select dialogstyle = vbOKOnly + vbCritical Title = "Invalid Date" Response = MsgBox(msg, dialogstyle, Title) End If End Sub ----------------------------------------------------------------------- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
width of ComboBox for data validation | Excel Discussion (Misc queries) | |||
Combobox/data validation | New Users to Excel | |||
How to use validation formulas in Combobox | Excel Discussion (Misc queries) | |||
Combobox and data validation | Excel Discussion (Misc queries) | |||
data validation vs combobox | Excel Discussion (Misc queries) |