combo box

C

Christy

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.
 
C

Christy

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?
 
M

Michael Tomasura

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





--
 
I

ibeetb

youyr best bet...is to look up and use the Bookmarks property. Bookmarks
remember the last choice when using any of the VB Controls
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top