API/VBA: Set swSelMgr

Hello

I have to merge two Macros but I'm just starting out, and I don't understand all of them.

each Macro uses the swSelMgr variable but not in the same way.

Set swSelMgr = Part.SelectionManager
and 
Set swSelMgr = swModel.SelectionManager

What is the difference between this two lines?

How to get around the problem?

I tried to see the info included in what I believe to be a variable with "MsgBox" or the local Variable display, but it doesn't seem to work.

Kind regards

 

It's the same line. Only the variable name is different

to get around the problem you can place: "Set swModel = Part" before "Set swSelMgr = swModel.SelectionManager" (if this line is after Set Part = swSelMgr...)  

But the best is to rename all the "Part" to "swModel"