Showing results 1 to 4 of 4

Thread: VBA macros not appearing

  1. #1
    Join Date
    04.07.2013
    Posts
    4

    Default VBA macros not appearing

    Hi!

    When I try to make a new “Execute VBA macro” function in zenon 7 none of the macros are showing up under the list of options.
    It does give me the full list of macros when I’m editing one of the buttons I created for my screen, so I can’t figure out why it won’t show up when I’m making a new function.

    Any help is appreciated!

  2. #2

    Default Re: VBA macros not appearing

    Hi dnaf,

    Thanks for your post, and welcome to the forum

    The function "execute VBA macro" will only list those VBA macros that are located in e.g. "thisproject", that match the number of parameters defined at the function.

    If you have a "sub test()" in "thisproject", and you don't specify any parameters at the function, this procedure should be listed when you create a new execute vba macro.

    If you have a "sub test (mString as String)", and you have specified one parameter at the function, this procedure should be listed at the execute vba macro function.

    VBA macros in the ModuleElement are designated to be executed on zenon element events (e.g. leftclickdown), and cannot be executed through a "execute vba macro" function.

    I hope this helps
    Best regards,
    Mark

  3. #3
    Join Date
    04.07.2013
    Posts
    4

    Default Re: VBA macros not appearing

    Great, got it!
    Thanks!

  4. #4
    Join Date
    30.03.2016
    Posts
    35

    Default Re: VBA macros not appearing

    Hi dnaf,

    Thanks for your post, and welcome to the forum

    The function "execute VBA macro" will only list those VBA macros that are located in e.g. "thisproject", that match the number of parameters defined at the function.

    If you have a "sub test()" in "thisproject", and you don't specify any parameters at the function, this procedure should be listed when you create a new execute vba macro.

    If you have a "sub test (mString as String)", and you have specified one parameter at the function, this procedure should be listed at the execute vba macro function.

    VBA macros in the ModuleElement are designated to be executed on zenon element events (e.g. leftclickdown), and cannot be executed through a "execute vba macro" function.

    I hope this helps
    Best regards,
    Mark


    Is this still working in 7.50. Because I followed the procedure but when the function is executed it is not running the sub. I put a stop in the sub but it will not break at the beginning of the sub

    Should the parameter that I have input in the function have the following syntax  VARSTRINGPARAM or "VARSTRINGPARAM" (both are not working)

Similar Threads

  1. My workspace Macros?
    By softart2 in forum VSTA
    Replies: 4
    Last Post: 27th December 2010, 00:58

Posting Rules

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