Hello guys,
i have below code in Sheet2 for a ComboBox.
I want to use Cambovalue in other macro in Module1, but this variable is empty there.
I tried setting it as Public in Sheet2 and also tried in Module1, but it is always empty inside the macro.
Any help would be much appreciatted.
Regards,
Brian
i have below code in Sheet2 for a ComboBox.
Code:
Public Combovalue As String
Private Sub ComboBox21_Change()
'Comboindex = Sheet2.ComboBox21.ListIndex + 1
Combovalue = Sheet2.ComboBox21.Value
Select Case Combovalue
Case "Italy"
Sheets("Sheet1").Cells(2, 1).Value = "S060"
Case "Germany"
Sheets("Sheet1").Cells(2, 1).Value = "S057"
Case "UK"
Sheets("Sheet1").Cells(2, 1).Value = "S064"
End Select
End Sub
I want to use Cambovalue in other macro in Module1, but this variable is empty there.
I tried setting it as Public in Sheet2 and also tried in Module1, but it is always empty inside the macro.
Any help would be much appreciatted.
Regards,
Brian