+ Reply to Thread
Results 1 to 8 of 8

ActiveControl - Return non-Multipage control when Form contains Multipage?

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Angry ActiveControl - Return non-Multipage control when Form contains Multipage?

    Hello All,

    I have just started learning ActiveControl and have run into problems. I have a form which (amongst other things) contains labels and a MultiPage. I want to use ActiveControl to detect which label was clicked instead I get "Frame_MultiPage". So I searched the net and found this http://social.msdn.microsoft.com/For...forum=exceldev however this code doesn't do what I want - now I get "MultiPage1".

    I don't want to return the Multipage or any of the controls inside the Multipage. I want to return the label clicked. Is there anyway to do this using ActiveControl?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Why don't you try the ActiveControl of the frame?

    Also, you might want to look into using classes.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Quote Originally Posted by Norie View Post
    Why don't you try the ActiveControl of the frame?
    There is no Frame around the labels.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Sorry, meant multipage - confused by name I think.

  5. #5
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Quote Originally Posted by Norie View Post
    Sorry, meant multipage - confused by name I think.
    That's OK.

    The labels are outside the Multipage. When I use the code from the link provided in the OP, it only drills down further into the Multipage. I want to detect the ActiveControl for controls outside the Multipage. :S

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Perhaps the problem is that labels can't take focus, so they are never 'active'.

  7. #7
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    Quote Originally Posted by Norie View Post
    Perhaps the problem is that labels can't take focus, so they are never 'active'.
    Ah daylight :facepalm:. Thanks Norie +1

  8. #8
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: ActiveControl - Return non-Multipage control when Form contains Multipage?

    This thread is solved by Norie.

    I now need an alternative solution to using ActiveControl... http://www.excelforum.com/excel-prog...procedure.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MultiPage Control User form - Pages are printed on top of each other?
    By Grizelda in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2013, 08:55 AM
  2. Multipage Control
    By AlexanderBB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2011, 09:27 AM
  3. Multipage control help
    By desk.doc in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-24-2007, 02:04 PM
  4. MultiPage control
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2006, 12:35 PM
  5. MultiPage control
    By Patrick Simonds in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2006, 12:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1