Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Reference Label from TextBox

On Sun, 20 Jul 2008 18:15:38 +0100, "Peter T" <peter_t@discussions
wrote:

Yes, it works now. I'd left out the textbox number when I tried.

Thanks very much for your help.


"Peter T" <peter_t@discussions wrote in message

Your routine SetLabel is called by the keypress event of a textbox on a
form. Surely the form containing the textbox is the "currently active
UserForm". That being the case txtBox.Parent will reference the form.


....unless the textbox is "in" a frame or multipage in which case you'd use

txtBox.Parent.Parent

or if on a Multipage then you'd use

txtBox.Parent.Parent.Parent

Regards,
Peter T

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
Floating textbox/label Jock Excel Programming 6 March 10th 10 11:19 AM
Use a formula to populate a label from a textbox damorrison Excel Discussion (Misc queries) 5 September 4th 06 01:30 PM
Textbox and label formulas-continue damorrison Excel Discussion (Misc queries) 3 March 12th 06 06:32 PM
Centralizing Vertically of Label and TextBox zhj23 Excel Programming 0 March 2nd 06 03:28 PM
textbox result to label paradise Excel Programming 2 November 15th 03 01:10 PM


All times are GMT +1. The time now is 05:21 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"