• Public function (Office 2003)

    Author
    Topic
    #450132

    Hi all,

    I am calling a public function called “TARbtnLabel” which assigns a caption to a button. In this Public function I have a variable called “vFMRString” which captures data from various fields and stores them as a string, then assigns that string as the caption on the button. I want to be able to use that variable elsewhere in my program without recreating a lot of code. Is it possible to use that variable since it is contained inside of a public function?

    thanks
    Kevin

    Viewing 0 reply threads
    Author
    Replies
    • #1105277

      If you want to use the variable outside the function, you should declare it at the top of the module as a public variable.

      Public vFMRString

      or

      Public vFMRString As String

      Remove the declaration of vFMRString from your function (this is important)!

    Viewing 0 reply threads
    Reply To: Public function (Office 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: