LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Returning active control name on multipage

Ryan,
'This works with a command button on a userform, it does not work with a label...
Private Sub CommandButton1_Click()
MsgBox Me.ActiveControl.Name
End Sub

'This passes the label name to the called procedure...
Private Sub LabelOne_Click()
Call ThisIsATest("LabelOne")
End Sub

Sub ThisIsATest(strName As String)
MsgBox strName
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Hokievandal"

wrote in message
When i click a lablel, i want to pass the label name onto a procedure but I
can't figure out how to recognize the active control's name (is a label the
active control if it has been clicked?). Here's the code after the label has
been clicked that does not return any value (just an error).

Me.Multipage.SelectedItem.ActiveControl.Name
Thanks,
Ryan


 
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
MultiPage control Patrick Simonds Excel Programming 0 August 5th 06 05:33 PM
Multipage control mark Excel Programming 1 September 2nd 04 07:57 AM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM
MultiPage control George[_18_] Excel Programming 0 February 6th 04 03:33 PM
Can I set a page of a Multipage form to active? John T Ingato Excel Programming 2 October 11th 03 12:15 AM


All times are GMT +1. The time now is 02:41 PM.

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"