Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combo box auto refresh
Hi,
I have this combo box created from control toolsbox using as a DO nos display. The ListFillRange is link to worksheet 2 with all the DO Nos (ie: Sheet2!A1:A1000) assign. I have this command button for printing. Once I click this print command button, it will print out 2 sheet of the first page. (Line 1) Then follow by it will save the worksheet as the DO Nos. (Line 2) Then follow by it will delete the DO Nos from worksheet 2. (Line 3) Then finally, it will save the workbook as it original name. (Line 4) The Code is as following :- Private Sub CommandButton1_Click() Sheet1.Cells.PrintOut (1), (1), (2) ThisWorkbook.SaveCopyAs (Sheet2.Cells(1, 1)) Sheet2.Cells(1, 1).Delete ThisWorkbook.Save End Sub My problem, the combo box did not automatics refresh/update the display to the latest DO number. It still show the deleted DO Nos. But when I use the form combobox, it will automatically update. The reason I want to use this Control Toolsbox Combo Box is because of the fonts issue. Sorry for the long winded description. Appreciate if anyone can advise me. Thanks a million in advance... Cheers... Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combo box auto refresh
hi,
Can you not just add code to the combo that clears it then used the new range? to clear use the .clear method? or am i missing something? Ross |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
combo box auto refresh
Hi Ross,
Thanks for your reply. I have try the method you mention but it detected error. I have find my way to solve it. The code is as follow :- ------------------------------------------------------ Private Sub CommandButton1_Click() Sheet1.Cells.PrintOut (1), (1), (2) ThisWorkbook.SaveCopyAs (Sheet2.Cells(1, 1)) Sheet2.Cells(1, 1).Delete ComboBox16.Text = Sheet2.Cells(1, 1) ComboBox16.Value = Sheet2.Cells(1, 1) ThisWorkbook.Save End Sub ------------------------------------------------------- Anyway, thanks again. Cheers... Jason -----Original Message----- hi, Can you not just add code to the combo that clears it then used the new range? to clear use the .clear method? or am i missing something? Ross . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Refresh | Excel Discussion (Misc queries) | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
How can I auto refresh a column that has an auto filter in place | Excel Discussion (Misc queries) | |||
Auto Refresh | Excel Discussion (Misc queries) | |||
How can I auto-refresh auto-filters when data changes? | Excel Worksheet Functions |