Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default label caption

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default label caption

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
label caption gramps Excel Discussion (Misc queries) 0 November 1st 07 03:56 PM
Label Caption Problem Ludo Soete Excel Programming 1 December 29th 04 12:42 AM
Dynamic Label Caption Turtle MacDermott Excel Programming 6 November 22nd 04 02:43 PM
Label - Caption not changing Brian Hribek[_2_] Excel Programming 0 October 11th 04 10:02 PM
label caption Rod Taylor Excel Programming 2 July 31st 03 03:25 AM


All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"