Showing results 1 to 3 of 3

Thread: "smart object" using .vba macros

  1. #1
    Join Date
    20.08.2021
    Posts
    2

    Frage "smart object" using .vba macros

    Hello,

    in the smart object tab I cannot edit macros as it is possible in the main project. The VBA macros tool seems to be available but no way, to import or edit it, is available.


    Please inform me about the way I can edit vba code in the "smart objects".

    Thanks
    Gaétan
    Attached Thumbnails Attached Thumbnails SO_macro_vba.PNG  

  2. #2
    Join Date
    07.02.2017
    Posts
    11

    Beitrag Re: "smart object" using .vba macros

    Hey Gaétan!

    You are trying to link VBA macros at the Smart Object Templates but since it is not possible to define a macro within the Smart Object Template itself (as for these macros you need to have them in the list as shown below, Screenshot1) you cannot select the macros there.



    There is however a workaround: you can release the desired VBA macro property from the property list of the element to the Smart Object Template. If the element is part of a symbol you need to release the property first to the symbol and then to the Smart Object Template (Screenshot2-Screenshot4).




    When creating an Smart Object at the project you can then select the VBA macros from the project directly at the Smart Object (Screenshot5).


    I hope this helps you out 

    BR,
    KlemensN
    Attached Thumbnails Attached Thumbnails Screenshot1.png   Screenshot2.png   Screenshot3.png   Screenshot4.png   Screenshot5.png  


  3. #3
    Join Date
    20.08.2021
    Posts
    2

    Daumen hoch Re: "smart object" using .vba macros

    Thank you for the efficient and well developed answer !
    Gaétan

    Quote Originally Posted by klemensn View Post
    Hey Gaétan!

    You are trying to link VBA macros at the Smart Object Templates but since it is not possible to define a macro within the Smart Object Template itself (as for these macros you need to have them in the list as shown below, Screenshot1) you cannot select the macros there.



    There is however a workaround: you can release the desired VBA macro property from the property list of the element to the Smart Object Template. If the element is part of a symbol you need to release the property first to the symbol and then to the Smart Object Template (Screenshot2-Screenshot4).




    When creating an Smart Object at the project you can then select the VBA macros from the project directly at the Smart Object (Screenshot5).


    I hope this helps you out 

    BR,
    KlemensN


Similar Threads

  1. Event "Object deleted"???
    By wenzm in forum VBA
    Replies: 0
    Last Post: 13th December 2019, 14:27
  2. "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
  3. Replies: 3
    Last Post: 28th July 2017, 01:08
  4. Replies: 1
    Last Post: 13th March 2017, 13:51
  5. Replies: 4
    Last Post: 8th April 2009, 09:27

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
  •