+ Reply to Thread
Results 1 to 2 of 2

Passing a variable from one sub to another sub

  1. #1
    Registered User
    Join Date
    12-26-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    18

    Passing a variable from one sub to another sub

    Please help me in passing one variable with value from commandbutton click event routine to optionbutton click event routine.

    Your timely help will complete my project. Thank you in anticipation.

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Passing a variable from one sub to another sub

    I'm just curious - are you trying to pass value of variable declared within commandbutton_click procedure to optionbutton_click procedure? I think this is impossible, because optionbutton_click procedure does not accept any variable byRef or byVal (but I may be wrong )
    What I would do is to declare global variable (Public or Private) then assign it a value in cmd_click procedure and after that you can use it in optionbutton_click procedure.
    Maybe some more experienced users will have better ideas.

+ 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