Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Combobox/ trying to populate current year plus the next 10 years.

Started 1 month, 3 weeks ago by TurboDub
I'm trying to use a combobox to pull the current year and then populate the next ten years. I don't want to manually put in the years in the 'item collections'. I would rather it update automatically based on the system year. How should I go about doing this? My first instinct is to set the combobox item to the current year based on the system date, then create a loop that increments ...
Site: VBForums - Visual Basic and VB .NET Discussions and More!  VBForums - Visual Basic and VB .NET Discussions and More! - site profile
Forum: Visual Basic .NET  Visual Basic .NET - forum profile
Total authors: 2 authors
Total thread posts: 2 posts
Thread activity: no new posts during last week
Domain info for: vbforums.com

Other posts in this thread:

BackWoodsCoder replied 1 month, 3 weeks ago
vb Code: ComboBox1. Text = Date . Now . Year For i As Integer = 0 To 9 ComboBox1. Items . Add ( Date . Now . Year + i ) Next Yah, you could put that one in the form_load event. Or if you have a sub which loads your forms data, you could put it in there.

 

Top contributing authors

Name
Posts
TurboDub
1
user's latest post:
Combobox/ trying to populate...
Published (2009-11-06 16:47:00)
I'm trying to use a combobox to pull the current year and then populate the next ten years. I don't want to manually put in the years in the 'item collections'. I would rather it update automatically based on the system year. How should I go about doing this? My first instinct is to set the combobox item to the current year based on the system date, then create a loop that increments based on on counter up to current year +...
BackWoodsCoder
1
user's latest post:
Combobox/ trying to populate...
Published (2009-11-06 17:07:00)
vb Code: ComboBox1. Text = Date . Now . Year         For i As Integer = 0 To 9             ComboBox1. Items . Add ( Date . Now . Year + i )         Next Yah, you could put that one in the form_load event. Or if you have a sub which loads your forms data, you could put it in there.

Related threads on "VBForums - Visual Basic and VB .NET Discussions and More!":

Related threads on other sites:

Thread profile page for "Combobox/ trying to populate current year plus the next 10 years." on http://www.vbforums.com. This report page is a snippet summary view from a single thread "Combobox/ trying to populate current year plus the next 10 years.", located on the Message Board at http://www.vbforums.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity