Hi all, I'm trying to reset an ActiveX ComboBox on closing of a workbook and am struggling to get it to work (the rest of my BeforeClose code works fine). This is my code for before close on ThisWorkbook:
![]()
Private Sub Workbook_BeforeClose(Cancel As Boolean) 'Show formula bar and ribbon when workbook closed Application.DisplayFormulaBar = True 'Clear ComboBox 'Worksheets("Tables").Activate '.ComboBox1.Clear 'ComboBox1.ListIndex = -1 'Sheets("Tables").ComboBox1.Clear 'Hide all except sheet1 ready for reopening in the right place Worksheets(1).Visible = True Worksheets(2).Visible = False Worksheets(3).Visible = False Worksheets(4).Visible = False ThisWorkbook.Saved = True End Sub
I've tried a couple of different methods which I've left in but commented out so as I know what I have already tried when it comes to attempting each. Am I doing something really simple wrong as often the case?
Bookmarks