+ Reply to Thread
Results 1 to 4 of 4

Is it possible for a Recorded Macro to click on Form Control Buttons?

  1. #1
    Registered User
    Join Date
    03-12-2024
    Location
    USA
    MS-Off Ver
    Office 2023
    Posts
    2

    Is it possible for a Recorded Macro to click on Form Control Buttons?

    Hi everyone,

    We've recently started to receive a proprietary excel file from one of our market research partners. Sheets in these excel files are protected, so I have to go around a few things in order to extract the data from the sheet.

    Currently there are a couple of tables with about 30 rows, but it only shows the initial 10 rows of the table. In order to see further, you have to click the down arrow in the form control button on the left side of the table, which will scroll down by 2 more rows for each click.

    I'm trying to copy all 30 rows of this data without manually clicking things every time.

    So far I've tried recording a macro that copies the first 10 rows, clicks the format control button, and copies the next two rows.

    However the issue is that when I'm recording the Macro, it is not registering the button clicks I make to the form control button. It just copies the same exact rows without clicking the "scroll down" button on the table.

    How can I make sure my excel macro is clicking on the form control button that is used to scroll down? I'm not able to reach the data source, so only way to get the data is clicking the form control buttons and scrolling down from there.
    Last edited by theoutsider; 03-12-2024 at 12:32 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Re: Is it possible for a Recorded Macro to click on Form Control Buttons?

    If the data is present in the table, you don't (shouldn't) need to display it in order to copy it.

    For example, if you create a new sheet and put this in cell A1, you should be able to view the data: =Source!A1:Z30 should display 26 columns by 30 rows of data in the sheet Source. Adjust as required.

    You might need to format it appropriately and, with this simple formula, blank cells will show up as zero.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-12-2024
    Location
    USA
    MS-Off Ver
    Office 2023
    Posts
    2

    Re: Is it possible for a Recorded Macro to click on Form Control Buttons?

    Quote Originally Posted by TMS View Post
    If the data is present in the table, you don't (shouldn't) need to display it in order to copy it.

    For example, if you create a new sheet and put this in cell A1, you should be able to view the data: =Source!A1:Z30 should display 26 columns by 30 rows of data in the sheet Source. Adjust as required.

    You might need to format it appropriately and, with this simple formula, blank cells will show up as zero.
    Unfortunately data isn't that clearly put. There are a lot of operations going behind the scenes to figure out the data the table in excel sheet is going to serve.

    For example, a single cell in the table refers to a very hidden sheet with a lot of index matching:

    =IFERROR(INDEX(prepData!AX10:BL40,MATCH(SMALL(prepData!N10:N40,'KPI Overview'!C12:C22+1),prepData!N10:N40,0),COLUMN()-4),"")

    When you unhide the prepData sheet, you find that it references further 8 other very hidden sheets depending on selections from a dropdown menu.

    It would basically take me hours upon hours to figure out where exactly the original data is, and what kind of formulas are being used to generate them. Not to mention this will be made difficult since the sheets are all protected.

    If I can't find a way to click buttons natively in excel, my next step is probably going to be using autohotkey + pulover's macro creator.
    Last edited by theoutsider; 03-12-2024 at 01:22 PM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Re: Is it possible for a Recorded Macro to click on Form Control Buttons?


+ 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. Can't click on macro buttons
    By PatKlaus in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-29-2017, 02:08 AM
  2. [SOLVED] Macro to click buttons?
    By OpOrange in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2015, 02:06 PM
  3. Click on CSS Menu buttons in IE with a MACRO
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-25-2013, 10:08 AM
  4. Recorded macro that creates buttons errors when I run it
    By cklein in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-09-2012, 06:24 PM
  5. Recorded Macro to Copy Format
    By Lilbit in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2006, 05:45 PM
  6. I click on something and my Macro buttons disappered. Help.
    By Colleen in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 12-19-2005, 02:10 PM
  7. Control toolbox Buttons disappear on click
    By Mangesh Yadav in forum Excel General
    Replies: 2
    Last Post: 09-16-2005, 01:05 AM

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