+ Reply to Thread
Results 1 to 4 of 4

VBA/Macro to automate clicking multiple buttons

  1. #1
    Registered User
    Join Date
    03-10-2021
    Location
    England
    MS-Off Ver
    2013
    Posts
    26

    VBA/Macro to automate clicking multiple buttons

    Hi

    I have a task I perform weekly where I need to press an 'Update' button on 6 different spreadsheets. I just wondered how easy it would be for me to create a macro or some VBA to automate this?

    It would need to open a file, press 'Update' on the first pop-up, then click the actual 'Update' macro button that updates the data in the sheet from a Pi-Datalink and then save the file, close the file and repeat the process for the other 5 files.

    I'm wondering if anyone could help with that, as I have no experience with VBA.

    Many thanks in advance.
    Last edited by Excel_NoneTheWiser; 02-21-2022 at 05:57 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA/Macro to automate clicking multiple buttons

    The macro below assumed that you know the name of the sub which assigned to the "Update" button,
    the name of the sub (for the update) are all the same on all of the six workbooks,
    and all the six workbooks are in one folder without any other file.

    Make a new workbook, put the macro in the workbook module :
    Please Login or Register  to view this content.
    From the macro above,
    all the six workbooks are in drive D folder test,
    and the macro name is test on all of the six workbooks.
    Change the directory and the name of the "Update" button sub as needed.

    When you open the workbook with that macro above,
    it will open each of the workbbok di drive D:/test, run the test Sub on each wb, save then close it.
    Last edited by karmapala; 02-21-2022 at 06:09 AM.

  3. #3
    Registered User
    Join Date
    03-10-2021
    Location
    England
    MS-Off Ver
    2013
    Posts
    26

    Re: VBA/Macro to automate clicking multiple buttons

    Amazing, thank you. I had to tweak a tiny bit to factor in something I had forgotten but this helped massively, thanks a lot, man.

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: VBA/Macro to automate clicking multiple buttons

    Hi Excel_NoneTheWiser,
    Glad I can help, and thank you for the rep

+ 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. Accessing Website and Clicking Buttons
    By pedro90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2020, 02:48 PM
  2. Keep rows hidden even after clicking +/- rollup buttons
    By heygreene in forum Excel General
    Replies: 7
    Last Post: 01-16-2020, 01:49 PM
  3. To automate clicking ok for a pop up box
    By Newbuilder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2018, 12:17 PM
  4. Hide buttons when clicking
    By DDayWalker182 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2016, 02:22 PM
  5. Help Automate Clicking Multiple Links Internet Explorer
    By spiklz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2015, 10:56 AM
  6. Replies: 3
    Last Post: 02-28-2012, 02:05 PM
  7. Entering input and clicking buttons during loop
    By FlyinJack in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2009, 07:47 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