Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
refreshing combo box in form?
Is there a way to refresh the combo box after creating a new record in the
worksheet? I have a simple form that enters Names & Sales units to the worksheet...I also have a combo box on the same form whose row source is the names. After I add the record by using the on click event, how do I refresh the combo box at the same time? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
refreshing combo box in form?
How about clearing the rowsource and reassigning it to the expanded (and
sorted???) range. Option Explicit Private Sub CommandButton1_Click() Dim DestCell As Range If Me.TextBox1.Value = "" Then Beep Else With Worksheets("Sheet1") Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0) DestCell.Value = Me.TextBox1.Value Me.TextBox1.Value = "" Me.ComboBox1.RowSource = "" Me.ComboBox1.RowSource _ = .Range("A1", .Cells(.Rows.Count, "A").End(xlUp)) _ .Address(external:=True) End With End If End Sub basstbone wrote: Is there a way to refresh the combo box after creating a new record in the worksheet? I have a simple form that enters Names & Sales units to the worksheet...I also have a combo box on the same form whose row source is the names. After I add the record by using the on click event, how do I refresh the combo box at the same time? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
linking a form combo box... results from the combo box to another | Excel Discussion (Misc queries) | |||
Refreshing a combo box...? | Excel Programming | |||
Auto refreshing and printing a form with data from each row of a spreadsheet | Excel Discussion (Misc queries) | |||
Combo Box Not Refreshing View | Excel Programming | |||
Refreshing a ActiveX combo box | Excel Programming |