Showing results 1 to 4 of 4

Thread: Can't run "subproject VBA function" from integration project.

  1. #1
    Join Date
    04.04.2011
    Posts
    8

    Default Can't run "subproject VBA function" from integration project.

    Hello.

    I have integration project with 6 subprojects. One of the task is to running some subproject VBA functions from integration project main screen.

    For example, I use the code like this:
    Code:
    ApplicationED.Projects.Item("SUBPROJECT_NAME").RtFunctions.Item("SUBPROJECT_FUNCTION_NAME").Start

    But nothing changes.

    This code, for changing variable, works fine:
    Code:
    Projects.Item("SUBPROJECT_NAME").Variables.Item("SUBPROJECT_VARIABLE_NAME").Value = 1

    Where is my fail? Should I change some project settings for correct work?

    Thanks

  2. #2
    Join Date
    10.12.2007
    Posts
    269

    Default AW: Can't run "subproject VBA function" from integration project.

    You've got it already in your example: simply don't use "ApplicationED" because this is the Editor Application, not the runtime. I usually go via thisProject.Parent.Projects.Item("...")...

  3. #3
    Join Date
    04.04.2011
    Posts
    8

    Default Re: AW: Can't run "subproject VBA function" from integration project.

    Quote Originally Posted by mst View Post
    You've got it already in your example: simply don't use "ApplicationED" because this is the Editor Application, not the runtime. I usually go via thisProject.Parent.Projects.Item("...")...

    Thanks for the answer. I changed code but nothing new.

    Code:
    thisProject.Parent.Projects.Item("SUBPROJECT_NAME").RtFunctions.Item("SUBPROJECT_FUNCTION_NAME").Start
    
    MsgBox "OK"
    Message box didn't shows too. I think there is some error in code, but I understand where. The code is so simple.

  4. #4
    Join Date
    04.04.2011
    Posts
    8

    Default Re: Can't run "subproject VBA function" from integration project.

    All works ok. The problem was in another place.

Similar Threads

  1. "Variable Use" list in "Project Analysis" window shown Empty
    By swamy.panakala@gmail.com in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 30th November 2019, 08:02
  2. Do not reload AddIn - With function "Reload project online"
    By tsvoboda in forum Add-In Framework
    Replies: 1
    Last Post: 1st October 2019, 11:00
  3. Replies: 0
    Last Post: 25th February 2019, 09:19
  4. Replies: 1
    Last Post: 13th March 2017, 13:51
  5. I always get "Error # -60 Opening file" with the function "Read Dbase file
    By wolfgangm in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 9th June 2009, 12:53

Posting Rules

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