Hi there,
I have a code on a userform in which when the first combo box is empty, if the user try to access the second one then he/she will receives a msg box showing up telling him/her to go back to the first one. I have used a cancel=true code to terminate the access of the second box if the first box is empty.
The problem with this is, it works on my computer and my friend's computer, but it didn't work on another friend's computer and the one I want to use the userform on. Why is this happening?
btw, I am using excel 2007 and the friend's computer that worked use excel 2010, while the one not worked are also excel 2007 i think.
Thank you!Code:Private Sub cboEquipment_DropButtonClick() If cboIndustry.ListIndex < 0 Then MsgBox ("Please choose an Industry/Company"), vbInformation Cancel = True cboIndustry.SetFocus Exit Sub End If End Sub Private Sub cboEquipment_Enter() If cboIndustry.ListIndex < 0 Then MsgBox ("Please choose an Industry/Company"), vbInformation Cancel = True cboIndustry.SetFocus Exit Sub End If End Sub




Reply With Quote