- Nov 13, 2015
Private Sub fruitList_Click()
Private Sub UserForm_Initialize()
'Dim xlApp As Excel.Application
'Set xlApp = CreateObject("Excel.Application")
'xlApp.Visible = True
'Identify fruit Workbook name'
'MsgBox ActiveWorkbook.name, vbInformation, "Workbook Name"
bprWb = ActiveWindow.Caption
Sheets("NA Fruit Data").Select
fruitChosen = fruitList.Value
lastrowFinal = ActiveSheet.Cells(Rows.count, "A").End(xlUp).row
If fruitChosen = "APPLE" Then
FilterAPPLE lastrowFinal, wb1
ElseIf fruitChosen = "BANANA" Then
FilterBAN lastrowFinal, wb1
ElseIf fruitChosen = "ORANGE" Then
FilterORANGE lastrowFinal, wb1
ElseIf fruitChosen = "PINEAPPLE" Then
FilterPA lastrowFinal, wb1
MsgBox "Please choose your fruit"
Above is the code used to choose the user's fruit of choice (changed to fruit for confidentiality). Basically, this userform will list all fruit and the user selects one. This works in MS 2010 package. Our company is rolling out updates to MS 2016 and now the macro will consistently produce a message box saying "Please choose your fruit" i.e. not registering the userform selection.
I was able to see on a computer it wasn't working, it references a MS Object Library 16.0 and I'm currently running 14.0 (macro still works for me).
I have tried clearing *.exd files from his C drive, but it still did not help.
Any ideas? Thanks in advance.