I am trying to breakdown a large-ish code into 2 or 3 smaller functions. Is it possible to pass RSEVent and Element as "object" (don't know if it's the right vba term!)
function JustGetOnWithItunction(MyRSEvent As CAE.ResponseSimulation.RSEvent, myFEElm As NXOpen.CAE.FEElement)
Breakingdown the main sub means it's easier to understand/manage but it's means that I have to repeat some lines of codes. Maybe using Public Dim might be easier
Any hint would be aprreciated
Yes, you can pass objects into a subroutine or function as parameters.
If you find repeating lines of code (or repeating sections of code) in your Main routine, these are prime candidates to break out into separate subroutines or functions.
When the functionality of your program is broken down properly into functions and subroutines, you should end up with no repeated code.
Thansk cowski1. Work well and simplfy the code a bit. Much appreciated