Showing results 1 to 6 of 6

Thread: VBA macro LeftClickUp for button doesn't work.

  1. #1
    Join Date
    01.12.2009
    Posts
    23

    Frage VBA macro LeftClickUp for button doesn't work.

    Hello!
    I need your help again...
    I've got a silly question today:

    I made a macro in SCADA Editor:
    MYPROJECT\Programming Interface\VBA macros
    Macro Modules\ModuleElement\LeftClickUp\LeftClickUp_MyPr oc
    Then I've put a button onto my screen and set my macro in a property LeftClickUp of the button.

    It worked before.
    But one moment it stopped to execute and I don't understand what could I make to break it down?
    I cannot even display a msgbox - the button doesn't execute my macro at all
    I tried to put on a new button and attach to my macro. But it doesn't work too...

  2. #2
    Join Date
    20.08.2009
    Posts
    293

    Default Re: VBA macro LeftClickUp for button doesn't work.

    Hi,

    do other VBA Macros still work?

    Can you check the zenon6.ini if VBA is enabled?

    Should be:
    [VBA]
    EIN=1
    EVENT=1

    Regards,
    Bernhard

  3. #3
    Join Date
    01.12.2009
    Posts
    23

    Default Re: VBA macro LeftClickUp for button doesn't work.

    I've found the zenon6.ini file
    and found the following text there:
    [VBA]
    EIN=1
    EVENT=1
    UPDATE=0

    But my macros doesn't work still.
    I tried to create a new macros, but it doesn't work too

  4. #4
    Join Date
    28.07.2008
    Posts
    64

    Default Re: VBA macro LeftClickUp for button doesn't work.

    Does the Macro exsit in the VBA Module "ModuleElement" of your project?

    Did you try setting a preakpoint in the macro code and depug the code? Does the depugging session stop on the breakpoint?

  5. #5
    Join Date
    01.12.2009
    Posts
    23

    Default Re: VBA macro LeftClickUp for button doesn't work.

    Yes
    I created the macros, then moved to ModuleElement in VBA Editor and wrote a command msgbox("hello") in my macros.
    I opened the VBA editor from Runtime, then set a breakpoint there, but my macros doesnt starts to execute when I push the button.
    And I've set the property LeftClickUp of the button with my macros name

  6. #6
    Join Date
    01.12.2009
    Posts
    23

    Default Re: VBA macro LeftClickUp for button doesn't work.

    Hello
    I've decide the problem.
    It was a really silly question
    Thank you for your attention to my problem.
    I think the probem was because of I've forgotten to change a procedure (sub) name. So there were two procedures with the same name. And the editor didn't show the mistake.
    I'm really ashamed
    Thank you!

Similar Threads

  1. Replies: 1
    Last Post: 11th June 2009, 08:02
  2. Allocation from zenOn to Straton doesn't work?
    By sbc in forum straton / zenon Logic
    Replies: 1
    Last Post: 9th February 2009, 13:21
  3. How to create a new MACRO?
    By matholton in forum VBA
    Replies: 2
    Last Post: 24th September 2008, 12:14
  4. Network doesn't work on Windows CE devices
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 28th August 2007, 12:11
  5. CE doesn't find runtime-server
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 28th August 2007, 11:44

Posting Rules

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