#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default combo box

I have a combo box set up with the months of the year
using the add item method. Intially, the box appears
empty. How can I make the box appear with a month already
selected? I would like it start with January, but then
display the month last selected when the user re opens
the program. Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default combo box

Try this

Private Sub Workbook_Open()

ComboBox1.Text = "January"

End Sub

--

"Christy" wrote in message
...
I have a combo box set up with the months of the year
using the add item method. Intially, the box appears
empty. How can I make the box appear with a month already
selected? I would like it start with January, but then
display the month last selected when the user re opens
the program. Any help would be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default combo box

Thanks.

That workes to get something in the box. How can I make
it remember what is selected next and show that the next
time the workbook is opened?
-----Original Message-----
Try this

Private Sub Workbook_Open()

ComboBox1.Text = "January"

End Sub

--

"Christy" wrote in message
...
I have a combo box set up with the months of the year
using the add item method. Intially, the box appears
empty. How can I make the box appear with a month

already
selected? I would like it start with January, but then
display the month last selected when the user re opens
the program. Any help would be greatly appreciated.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default combo box

Easy way.


Private Sub ComboBox1_Change()
Sheet2.Range("A1") = Sheet1.ComboBox1.Text
End Sub

Private Sub Workbook_Open()
If Sheet2.Range("A1") = "" Then
Sheet1.ComboBox1.Text = "January"
Sheet2.Range("A1") = "January"
Else
Sheet1.ComboBox1.Text = Sheet2.Range("A1")
End If
End Sub

Make sure Sheet2 Cell A1 is formatted as Text


Another way is to write a file using FSO





--

"Christy" wrote in message
...
Thanks.

That workes to get something in the box. How can I make
it remember what is selected next and show that the next
time the workbook is opened?
-----Original Message-----
Try this

Private Sub Workbook_Open()

ComboBox1.Text = "January"

End Sub

--

"Christy" wrote in message
...
I have a combo box set up with the months of the year
using the add item method. Intially, the box appears
empty. How can I make the box appear with a month

already
selected? I would like it start with January, but then
display the month last selected when the user re opens
the program. Any help would be greatly appreciated.



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default combo box

youyr best bet...is to look up and use the Bookmarks property. Bookmarks
remember the last choice when using any of the VB Controls
"Christy" wrote in message
...
I have a combo box set up with the months of the year
using the add item method. Intially, the box appears
empty. How can I make the box appear with a month already
selected? I would like it start with January, but then
display the month last selected when the user re opens
the program. Any help would be greatly appreciated.





Reply
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
How do I create a combo box that is tied to another combo box? rosamaria Excel Worksheet Functions 2 December 9th 09 10:32 PM
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo reference on another combo box for picking address etc. kbjin Excel Worksheet Functions 1 December 8th 06 03:29 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 02:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 07:45 PM


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