+ Reply to Thread
Results 1 to 5 of 5

Passing multiple variables to button .onaction

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Passing multiple variables to button .onaction

    I am having a problem trying to pass multiple variables to a button's .OnAction call. I want to be able to pass multiple variables to the .OnAction property of a button.

    This code works when I want to send one variable:
    Please Login or Register  to view this content.
    I want to be able to pass all 3 variables into the Button_Click call for each button that I have. I have been trying many different syntaxes and have not been able to get it to work properly. How would I be able to pass "strText, intNumber, lngLong" variables to the .OnAction call?

    Thanks for the help

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: Passing multiple variables to button .onaction

    To avoid confusing quotes try this approach.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-24-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Re: Passing multiple variables to button .onaction

    When I try to run that, I get a "Run-time error '424'; Object required" error message. Is there something else that I might be missing?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: Passing multiple variables to button .onaction

    Here is a working example
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2011 Mac
    Posts
    3

    Re: Passing multiple variables to button .onaction

    Thanks for the help! I was able to see what I was doing wrong, and you have saved me lots of time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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