Click here to Skip to main content
16,016,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Drop-down
1) New Application
2) send to...
3) formalities..
4) marked...
5) object
6) reply


when select dropdown menu 5(object) message should be show ("Please reply before (date) +20 day)

for e.g

today date 23 sep 2014
message box ("Please reply before 13 Oct 2014")

please give me some guide for vb.net in vb.net combobox
Posted
Updated 22-Sep-14 20:53pm
v2
Comments
Manas Bhardwaj 23-Sep-14 3:06am    
And what have you tried so far?

txtAppsDate.Text = Today.AddDays(20)
 
Share this answer
 
Assuming you have a Combobox called Combobox1 in your Form adding something like this to the SelectedIndexChanged event for that Combobox might work for you;
VB
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
    If ComboBox1.SelectedIndex = 4 Then
        Dim today As DateTime = DateTime.Today
        Dim dueDate As DateTime = today.AddDays(20)
        MessageBox.Show(String.Format("Please reply before {0}", dueDate.ToString("dd MMM yyyy")))
    End If
End Sub

Hope this helps,
Fredrik
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900