ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lables that Change with Names for Games... (https://www.excelbanter.com/excel-programming/336856-lables-change-names-games.html)

Adeptus - ExcelForums.com

Lables that Change with Names for Games...
 
Is there a way that you can make a UserForm Lable change the captio
when selected values in a ComboBox are selected


Nigel

Lables that Change with Names for Games...
 
Try this.........

Private Sub ComboBox1_Change()
Dim msgtext As String
Select Case ComboBox1.ListIndex
Case Is = 0: msgtext = "Text 0"
Case Is = 1: msgtext = "Text 1"
Case Is = 2: msgtext = "Text 2"

End Select
Label1.Caption = msgtext
End Sub



--
Cheers
Nigel



"Adeptus - ExcelForums.com" wrote
in message ...
Is there a way that you can make a UserForm Lable change the caption
when selected values in a ComboBox are selected?





All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com