How to pass a parameter from excel to vb?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Naldo
    New Member
    • Jul 2008
    • 3

    How to pass a parameter from excel to vb?

    I'm attempting to to display info on Excel from a recordset, blah de blah...

    On my output, I've got a button which I'm hoping to trigger more code from vb if required.

    How can I then pass the paramter from the button_click on the Workbook back through to my program??

    Thanks in advance!!
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    Do you mean
    You have a button on the spreadsheet
    When you click the button it will execute some VBA code on that same spreadsheet
    ?

    The parameter that you want to pass...where is it coming from?
    I ask because a button is meant to respond to a user click. Its not
    really intrinsically associated with any data that needs to be passed.

    If its data that has been entered into a cell, for example. Then the VBA code that handles the onclick for the button would access that cell directly. It wouldn't be passed in a parameter


    PS
    Note the distinction between VBA and VB
    VBA is a cut down version of VB that is used in applications such as Excel, Word and Access

    Comment

    • Naldo
      New Member
      • Jul 2008
      • 3

      #3
      Delerna

      No, what I mean is that I have a button on the spreadsheet and when I click it, i want it to execute VB code back in my application, not in the spreadsheet.

      I don’t necessarily have to pass a particular parameter, I am wanting the button on the spreadsheet to act as a trigger for more output to be produced.

      For example, on my application you click, say, ‘Print Report’ which gives you summary info, then you click the ‘More Detail’ button on the spreadsheet to then execute more code which returns more detail on the spreadsheet! The user might not want all the detail all of the time!

      I'm thinking either that I could set up an ODBC connection and use Let's or something along those lines?!?!

      Thanks for your help!

      Comment

      • CyberSoftHari
        Recognized Expert Contributor
        • Sep 2007
        • 488

        #4
        Use Exel Macros.
        (Try your best and Explain your problem in detail.)

        Comment

        Working...