+ Reply to Thread
Results 1 to 5 of 5

Navigation

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Navigation

    Hi,

    I've got many activex controls in individual excel cells

    Is there a way to determine in any cell if a control exists in it?

    I'm manually creating a keydown event for every control to create a tab & shift+tab through the controls (and also selecting the cells they are in, that way the sheet moves with it).

    This is a very tedious process. Has anyone done this before? Is there an easier way?

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Navigation

    Hi steven_b46,


    Is there a way to determine in any cell if a control exists in it?
    The only way I know of doing this is to determine the coordinates of the cell, and then iterate through all controls on the sheet, and determine if one or more controls and the cell intersect.

    ---------------------
    The approach I like to take is to create the controls programmatically (one time only during Workbook design), and rename the controls to coincide with the cell in which they reside. For example an Active X text box in cell B7 would be named 'TextBoxB7'. It is relatively easy for the event handler to extract the Cell Address from the Control Name.

    See the attached file which:
    a. creates several Active X Text Box controls using the naming convention above
    b. uses a 'Class Event Handler' so that one Macro can process all Active X controls of the same type.
    c. currently has 'Event Handler' capability for 'Double Click' and 'Change' events.

    Lewis

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Navigation

    Thanks!!! I will look this over.

  4. #4
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Navigation

    OK, this works (thanks again), when I put this in my project, I get an error on

    Please Login or Register  to view this content.
    I see this in intellisense in what you sent, but not my project, so I'm doing something wrong?

    Ideas?

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Navigation

    Disregard, I'm an idiot. I see what is going on.

+ 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. Vba to ie navigation
    By moinsk21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2014, 06:53 AM
  2. [SOLVED] Tab-to-Tab Navigation
    By ikslohap in forum Excel General
    Replies: 2
    Last Post: 08-20-2011, 03:26 PM
  3. Navigation Bar
    By ZooTV92 in forum Excel General
    Replies: 2
    Last Post: 06-24-2011, 05:49 AM
  4. Navigation Bar
    By robert_shindorf in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2008, 12:55 PM
  5. Navigation help please
    By Walt Campbell in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-30-2005, 04:05 PM

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