Alex Simmons
New Member
- Joined
- Dec 3, 2012
- Messages
- 17
Hi, help please!
I have a multitab userform with various controls.
One control is a listbox, and the user can choose (in this case) Male or Female, and that's linked to a control source cell in my workbook, and it updates the linked cell just fine.
Other cells in the workbook then adjust their values based on various formulas.
e.g. one such individual cell with range name "FTP_Ranking" will vary depending on whether the sex of the client is male or female (it's an athletic ranking using a lookup table). Again the worksheet cell updates just fine based on the userform listbox choice.
On the userform I have various label captions which I want to update and display the information calculated in the workbook. These label captions appear on different tabs on the userform.
One example is a userform label named "CaptionFTPrating", which I want to display the content of the calculated workbook cell with range name of "FTP_Ranking".
So I have a private sub listbox change event handler code as follows:
I've also tried:
Neither change event code updates the label caption when I click on the listbox to change the option - either a click, a double click, click then hit enter, none of them updates the label caption.
Note that the label caption "FTP_Ranking" is on a different tab in the same userform to the listbox. There are many label captions on various tabs I need to update.
I thought this was the way to auto update captions but it seems not. Any suggestions?
Do I need to perform a repaint for each individual tab on the userform? If so, I don't know how I would do that.
Thanks for any help.
I have a multitab userform with various controls.
One control is a listbox, and the user can choose (in this case) Male or Female, and that's linked to a control source cell in my workbook, and it updates the linked cell just fine.
Other cells in the workbook then adjust their values based on various formulas.
e.g. one such individual cell with range name "FTP_Ranking" will vary depending on whether the sex of the client is male or female (it's an athletic ranking using a lookup table). Again the worksheet cell updates just fine based on the userform listbox choice.
On the userform I have various label captions which I want to update and display the information calculated in the workbook. These label captions appear on different tabs on the userform.
One example is a userform label named "CaptionFTPrating", which I want to display the content of the calculated workbook cell with range name of "FTP_Ranking".
So I have a private sub listbox change event handler code as follows:
Code:
Private Sub ListBox1_Change()
Me.CaptionFTPrating.Caption = Range("FTP_Ranking")
Me.Repaint
End Sub
I've also tried:
Code:
Private Sub ListBox1_Click()
Me.CaptionFTPrating.Caption = Range("FTP_Ranking")
Me.Repaint
End Sub
Neither change event code updates the label caption when I click on the listbox to change the option - either a click, a double click, click then hit enter, none of them updates the label caption.
Note that the label caption "FTP_Ranking" is on a different tab in the same userform to the listbox. There are many label captions on various tabs I need to update.
I thought this was the way to auto update captions but it seems not. Any suggestions?
Do I need to perform a repaint for each individual tab on the userform? If so, I don't know how I would do that.
Thanks for any help.
Last edited: