grooviness
New Member
- Joined
- Jul 19, 2017
- Messages
- 3
Hello. I was unable to find any leads on this by searching. I have a workbook with a sheet containing several combo boxes. The combo boxes are populated by code in the This Workbook module when the file opens. Some people can open the workbook without problems. Some other people get a "Run-time error 438. Object doesn't support this property or method" error.
The combo-boxes are populated upon opening because some people aren't allowed to make certain selections. The VBA looks at what directory the file is in and decides how to fill the combo-boxes.
This is a long-standing report and I can't figure out why this is happening all of a sudden, and only to some people. When the user clicks "debug" the line I changed to red is highlighted. I've checked to make sure the combo box has the correct name and there's nothing in the list fill range in the properties box. We're on Office 365 (a farily recent change). I've had the user I'm working with set options to trust all macros and trust access to the VBA project module.
I'd rather not post the entire module of code because I'd have to redact a lot of stuff. It's more of this type of thing, plus some if/else about the file location.
Thanks for any suggestions you have.
The combo-boxes are populated upon opening because some people aren't allowed to make certain selections. The VBA looks at what directory the file is in and decides how to fill the combo-boxes.
This is a long-standing report and I can't figure out why this is happening all of a sudden, and only to some people. When the user clicks "debug" the line I changed to red is highlighted. I've checked to make sure the combo box has the correct name and there's nothing in the list fill range in the properties box. We're on Office 365 (a farily recent change). I've had the user I'm working with set options to trust all macros and trust access to the VBA project module.
Rich (BB code):
Application.ScreenUpdating = False
ActiveWorkbook.EnableAutoRecover = False
Dim MyPath As String
MyPath = UCase(Application.CommandBars("Web").Controls("Address:").Text)
Sheets("MySheet").cboProgram.List = Array("(All)", "aaaa", "bbbb")
Sheets("MySheet").cboProgram.ListIndex = 0
I'd rather not post the entire module of code because I'd have to redact a lot of stuff. It's more of this type of thing, plus some if/else about the file location.
Thanks for any suggestions you have.