+ Reply to Thread
Results 1 to 2 of 2

calling an macro

  1. #1
    Registered User
    Join Date
    03-04-2005
    Posts
    20

    Cool calling an macro "If" you think you can help me !

    i would like 2 know if one of you guys know "IF" it is possible 2 call an macro from the "FORMULA" line in excel....

    a8y 4 the dummies:
    the line within excel not vba where you put text r functions inside such as:
    Please Login or Register  to view this content.
    Last edited by willie64; 03-31-2005 at 09:53 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Willie64,

    Functions placed in a VBA Module are the easiest to use since they return a value. That value then becomes the cell's value.

    Example Macro Called from Excel:

    A1 = 2
    A2 = 5
    Formula in A3
    =AddTogether(A1, A2)

    A3 = 5

    Macro Code:

    Public Function AddTogether(First_Number As Single, Second_Number As Single) As Single

    AddTogether = First_Number + Second_Number

    End Function


    Hope this answers your question,
    Leith Ross

+ 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