![]() |
【转帖】using methods vs seperate macros
using methods vs seperate macros
i'm working on this macro that is starting to grow into a full blown configurator ... problem is that my methods are starting to grow out of the roof here, and i'm thinking it might be better to split it all up and devide it into a set of seperate macro's. this to improve oversight , readablility. wich leads me to my next question; how can i launch/call a external/seperate macro from within a macro ? thanks ! bert solidworks professional 2009 sp2.0 hpxw4400 workstation intel core2 cpu 6600 @ 2.40ghz yes, i'm aware i have a funky surname .... swapp.runmacro smacrofile, smodulename, sprocedurename answer nevermind ! looked a bit deeper into it , and resolved my problem with this : option explicit dim swapp as sldworks.sldworks dim boolstatus as boolean private sub kc1image_click() unload mainform set swapp = application.sldworks dim filename as string filename = swapp.getcurrentmacropathname filename = left(filename, instrrev(filename, "\")) + "singlecell.swp" boolstatus = swapp.runmacro(filename, "main", "main") end sub greets, bert solidworks professional 2009 sp2.0 hpxw4400 workstation intel core2 cpu 6600 @ 2.40ghz yes, i'm aware i have a funky surname .... exactly ivana ! thanks ! solidworks professional 2009 sp2.0 hpxw4400 workstation intel core2 cpu 6600 @ 2.40ghz yes, i'm aware i have a funky surname .... quick |
所有的时间均为北京时间。 现在的时间是 07:05 PM. |