+ Reply to Thread
Results 1 to 3 of 3

VBA to click a command button when Workbook is opened and click a button when closed.

  1. #1
    Registered User
    Join Date
    01-08-2018
    Location
    San Angelo
    MS-Off Ver
    2016
    Posts
    1

    VBA to click a command button when Workbook is opened and click a button when closed.

    Hello,

    I have a stop watch in my excel file that relies on a start/stop button. I'm trying to create a VBA to click the command button (Start Timer) when the Workbook is opened and click the button (Stop Timer) and save when the excel file is closed.

    The stop watch VBA I'm using is attached and can be found here:

    https://onedrive.live.com/?id=863B7D...3B7DD7364138EC

    Thanks fro the help!
    Brock
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    2016
    Posts
    371

    Re: VBA to click a command button when Workbook is opened and click a button when closed.

    You can run code on workbook open and workbook close.

    https://analysistabs.com/excel-vba/r...ning-workbook/
    Design everything to be as simple as possible, but no simpler.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: VBA to click a command button when Workbook is opened and click a button when closed.

    X posted
    https://www.mrexcel.com/forum/excel-...vba-close.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. Load New Picture with a click of the "Command Click()" button
    By Brainwave in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2016, 01:49 PM
  2. Button Click on Spreadsheet commanded by Button Click on Userform
    By Quilie19 in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 04-07-2015, 11:35 PM
  3. How can i print filter report or move to new workbook by click command button
    By Nisar.mohammed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2014, 09:01 AM
  4. [SOLVED] How to Click a Command Button from another workbook
    By Mark Elkjaer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-26-2014, 05:21 PM
  5. Need Help command button click
    By limcaitie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2013, 10:34 PM
  6. Chart generated & closed with click of a button
    By Lex051201 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 02-23-2010, 08:27 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