Showing results 1 to 2 of 2

Thread: Pass parameter value to the script

  1. #1
    Join Date
    08.02.2013
    Posts
    6

    Default Pass parameter value to the script

    Hi all!

    Is it possible to pass parameters values from zenon runtime to the VBA procedure?
    For example: I have procedure:
    Public Sub Proc (byVal int As integer; byVal str As string)
    ...
    End Sub
    And I want write different values in variables "int" and "str", when macro is executed.

    Regards, Sabbonis

  2. #2
    martins Gast

    Default Re: Pass parameter value to the script

    hey,

    little hack how to do this at the moment:

    - create macro with no parameters
    - create function "Execute VBA macro" in the editor
    - select the macro
    - in the tag section, add your values (see screenshot)
    - open VBA editor and add same amount of parameters like in the zenon function

    I also added a screenshot where you can see a small sample.

    hope that helps,
    best regards,
    Martin
    Attached Thumbnails Attached Thumbnails funct.PNG   testscreen.PNG  

Similar Threads

  1. Replies: 1
    Last Post: 23rd October 2013, 00:23
  2. Script in Vsta aufrufen
    By armins in forum VSTA
    Replies: 1
    Last Post: 27th June 2013, 23:46
  3. Replies: 3
    Last Post: 25th June 2012, 08:16
  4. Start Program Transfer Parameter
    By whitetaru in forum zenon Supervisor
    Replies: 9
    Last Post: 4th May 2011, 01:45
  5. InitInstance(): The parameter is incorrect.
    By wolfgangm in forum zenon Supervisor
    Replies: 0
    Last Post: 19th August 2009, 07:32

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •