S
Souny
Hello all,
I have a combo box (from Control Toolbox) in Sheet1, and there are
selections in the combo box. The code for that combo box will execute based
on the selection that we choose from it.
Somehow, the combo box executes when the Excel file is opened. From my
understanding, the code should only execute when we make the selection from
it. Am I correct? The code is in Sheet1 and does not have anything like
"Private Sub Autpen()" would cause it to execute when the file is opened.
Did I do something wrong? Below is the structure of my code.
Private Sub cboCode_Click()
Application.ScreenUpdating=False
Select Case cboCode.Value
Case "Selection1"
'Do the following
Case "Selection2"
'Do the following
Cash "Selection3"
'Do the following
Case Else
'Do the following
End Select
Application.ScreenUpdating = True
End Sub
Thanks.
I have a combo box (from Control Toolbox) in Sheet1, and there are
selections in the combo box. The code for that combo box will execute based
on the selection that we choose from it.
Somehow, the combo box executes when the Excel file is opened. From my
understanding, the code should only execute when we make the selection from
it. Am I correct? The code is in Sheet1 and does not have anything like
"Private Sub Autpen()" would cause it to execute when the file is opened.
Did I do something wrong? Below is the structure of my code.
Private Sub cboCode_Click()
Application.ScreenUpdating=False
Select Case cboCode.Value
Case "Selection1"
'Do the following
Case "Selection2"
'Do the following
Cash "Selection3"
'Do the following
Case Else
'Do the following
End Select
Application.ScreenUpdating = True
End Sub
Thanks.