sde Posted October 27, 2003 Posted October 27, 2003 i need to make this combobox have the current month selected .. can someone help? i'm working with something like this: cbMonth.Items.Add(1); cbMonth.Items.Add(2); cbMonth.Items.Add(3); cbMonth.Items.Add(4); cbMonth.Items.Add(5); cbMonth.Items.Add(6); cbMonth.Items.Add(7); cbMonth.Items.Add(8); cbMonth.Items.Add(9); cbMonth.Items.Add(10); cbMonth.Items.Add(11); cbMonth.Items.Add(12); cbMonth.SelectedValue = DateTime.Now.Month; and this doesn't work. Quote codenewbie
sde Posted October 27, 2003 Author Posted October 27, 2003 cbMonth.SelectedItem works. Quote codenewbie
Moderators Robby Posted October 27, 2003 Moderators Posted October 27, 2003 Wow! It took you a whole two minutes. :) you can also save a bit code by sticking the Add method into a for loop. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.