Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a form with 15 Option Button controls. Each control represents an
asset. There are also 15 labels on this form. Each label caption contains the price for each asset. When the user pushes a button the macro cycles through the controls to get the asset. Based on the control, I would like to get the corresponding amount from the label caption. For example: Control.name Label.name P1_RB01 P1L01 P1_RB02 P1L02 P1_RB03 P1L03 Based on the option button selected, I strip off the last 2 characters and create a tmp string variable. If the user selects the first item, the string variable is "P1L" and "01" or "P1L01" How do I create another variable to get the amount? Both vamount = tmp.caption or vamount = label (tmp).caption doesn't work. Any suggestions would be appreciated. Thanks for the help....... -- JT |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
msgbox me.controls(tmp).caption
JT wrote: I have a form with 15 Option Button controls. Each control represents an asset. There are also 15 labels on this form. Each label caption contains the price for each asset. When the user pushes a button the macro cycles through the controls to get the asset. Based on the control, I would like to get the corresponding amount from the label caption. For example: Control.name Label.name P1_RB01 P1L01 P1_RB02 P1L02 P1_RB03 P1L03 Based on the option button selected, I strip off the last 2 characters and create a tmp string variable. If the user selects the first item, the string variable is "P1L" and "01" or "P1L01" How do I create another variable to get the amount? Both vamount = tmp.caption or vamount = label (tmp).caption doesn't work. Any suggestions would be appreciated. Thanks for the help....... -- JT -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
label caption | Excel Discussion (Misc queries) | |||
Label Caption Problem | Excel Programming | |||
Dynamic Label Caption | Excel Programming | |||
Label - Caption not changing | Excel Programming | |||
label caption | Excel Programming |