Skip to main content

Search

Search

Where To Create Global Function

Comments

5 comments

  • Avatar
    Legacy Poster
    [quote name='tj combos' timestamp='1315335481' post='525']
    Hello,
    Where can create this function so that it can be re-useable by other object?

    Function Celsius(fDegrees)
    Celsius = (fDegrees - 32) * 5 / 9
    End Function
    [/quote]

    I've figured it out, put in Event List Functions and Subs ............DUH!
    0
  • Avatar
    Legacy Poster
    [quote name='tj combos' timestamp='1315336471' post='527']
    I've figured it out, put in Event List Functions and Subs ............DUH!
    [/quote]

    I could not find where do you mean that it has to be put.
    Can you please specify it a little more?

    Many thanks
    0
  • Avatar
    Gene Henson
    Try these steps:

    [list=1]

    [*]Right click on an object on your label
    [*]Click on Properties
    [*]Change the Data Source to Visual Basic Script
    [*]Change the Type to Event Control Scripts
    [*]Click the Edit Button
    [*]When the editor opens the top most option in the event list will be Functions and Subs
    [/list]
    You can create subroutines in that area and then reuse them on other events/objects.
    0
  • Avatar
    Legacy Poster
    Hello,
    I just did this but I can't figure out the correct syntax to call such a function from within the vbscript of another data field. Could you please give an example ?

    Thanks a lot

    :-) Bernhard
    0
  • Avatar
    Legacy Poster

    "You can create subroutines in that area and then reuse them on other events/objects. "

     

    How? When I try and call a function from a different text object it doesn't recognise it.

    0

Please sign in to leave a comment.