Showing results 1 to 2 of 2

Thread: Rename Variables from VBA Wizard

  1. #1
    Join Date
    09.05.2013
    Posts
    49

    Default Rename Variables from VBA Wizard

    Dear all,

    I am using zenon Supervisor v7.50 SP0.
    Is there any way to rename variable from VBA Wizard?
    ModifyVariable method can not do that!

    Best reagrds,
    Svetozar Yolov

  2. #2
    Join Date
    09.05.2013
    Posts
    49

    Default Re: Rename Variables from VBA Wizard

    Deal All,
    Just succeed to rename variable from VBA.
    Here is an example:
     
    Dim zPRJ As Project
    Dim zVariable As Variable
     
       Set zPRJ = MyWorkspace.ActiveDocument
        Set zVariable = zPRJ.Variables.Item("SMI_Raw_Fault_0001")               ‘ old var name
        zVariable.Name = "SMI_Raw_Fault_0002"     ‘ new var name
     
       Set zPRJ = Nothing
        Set zVariable = Nothing

    best regards,
    Svetozar Yolov

Similar Threads

  1. Replies: 0
    Last Post: 18th May 2015, 14:48
  2. VBA Wizard
    By perschke in forum VBA
    Replies: 1
    Last Post: 17th January 2012, 23:34
  3. VBA Wizard Zuordnungen
    By perschke in forum VBA
    Replies: 1
    Last Post: 14th July 2011, 12:32
  4. Replies: 0
    Last Post: 22nd June 2010, 09:02
  5. Replies: 2
    Last Post: 21st April 2010, 12:43

Tags for this Thread

Posting Rules

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