+ Reply to Thread
Results 1 to 8 of 8

how to click a button from the ThisWorkbook module

Hybrid View

  1. #1
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: how to click a button from the ThisWorkbook module

    I would suggest that if you need to do this, the code should be in a normal module and visible to both the sheet's button and the ThisWorkbook code. If you do wish to do it using Run the syntax is
    application.run "sheet1.commandbutton1_click"
    assuming that sheet1 is the code name of the relevant sheet.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  2. #2
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    274

    Re: how to click a button from the ThisWorkbook module

    I would have thought that if the sub "Commandbutton_click" is a public sub in a normal module, you can call it from any worksheet or other module by just Commandbutton_click and not have to do the Application.run with the sheet1 qualifier.

+ 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. ThisWorkbook Module Add-in
    By asalamun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2017, 01:04 PM
  2. [SOLVED] Can't reference ThisWorkbook from a module in another workbook module
    By Bukovnik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2015, 11:32 AM
  3. Help calling a module from a button click
    By jpalmos in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2013, 03:16 PM
  4. Replies: 1
    Last Post: 08-30-2011, 02:23 AM
  5. [SOLVED] Spin Button control change capture in ThisWorkbook Module
    By STEVE BELL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2005, 05:05 PM
  6. How to click the button from module?
    By OKLover in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2005, 06:05 PM
  7. [SOLVED] Calls from sheet module to ThisWorkbook module
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2005, 11: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