Default value for ActiveX combo box when opening spreadsheet

jeff_cp

Board Regular
Joined
May 21, 2015
Messages
84
I have a spreadsheet with an ActiveX combo box in cell B5 that is linked to cell C5. I have a named range on another worksheet called "Parts_Entered" and my ListFillRange is pointed to it.

When I select a value from the drop down list in B5, I'm populating a date range in cells B6 and B7 based off the value in C5. I'd like the spreadsheet to open with cell B5 defaulted to "Today". Currently, cells B6 and B7 default to the correct dates so it's defaulting to "Today" (with a value of 0 in cell C5) but it's not showing the word "Today" in cell B5 when I open the spreadsheet.

Please help :). Thanks!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Ok I got it! I had to use ListIndex = 0 instead of Value = "Today" :

Private Sub Workbook_Open()
Dim TheConnectionName As String
For Each objWBConnect In ThisWorkbook.Connections
TheConnectionName = objWBConnect.Name
ThisWorkbook.Connections.Item(TheConnectionName).ODBCConnection.Connection = "ODBC;DSN=CHECKMATE"
Next objWBConnect

Sheets("Inventory_Detail").Parts_Entered.ListIndex = 0

End Sub

Thanks for the help!!!
 
Upvote 0

Forum statistics

Threads
1,215,563
Messages
6,125,550
Members
449,237
Latest member
Chase S

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top