+ Reply to Thread
Results 1 to 4 of 4

Calling a sub

  1. #1
    Registered User
    Join Date
    11-03-2009
    Location
    Methylane
    MS-Off Ver
    Excel 2003
    Posts
    23

    Calling a sub

    Say I wrote a sub, but the only whay to call it, at this moment, is via a button.
    How can I treat this sub as a macro (my knowledge of terminology is lacking here)? What I mean by this is, the button has to leave and it has to be called (eventually) by an external program.
    Any ideas?

  2. #2
    Registered User
    Join Date
    11-03-2009
    Location
    Methylane
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Calling a sub

    Ah, I think I see, I've to program it as a separate module I guess?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Calling a sub

    button has to leave and it has to be called (eventually) by an external program.
    Can you elaborate on that?
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Calling a sub

    You insert a Module & place the code into the module.

    The button code will usually be in the sheet module
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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