PDA

View Full Version : Create selectionset with active selection (in VBA)



ronanry
19th Apr 2011, 09:17 pm
Hi everyone,
If you read these line, i hope you're little familar with selectionset in vba
I made some search in google and on a lot of forum with the text i put in the title
but everything i can find is the "prompt for an object to select"
Never ever i was able to launch any command with ACTIVE object selected

What i try to do is to launch a macro (when clicking on a button, this part is good) and this macro should use current object to find X and Y (this part is good... but only after selecting a new object)

Thanks you for reading and for giving any path to seek on ...

BlackBox
20th Apr 2011, 01:54 am
Look into this:



object.ActiveSelectionSet


... Where the object in this case is the ActiveDocument object.

ronanry
20th Apr 2011, 05:49 am
Thx RenderMan,

yesterday in the late evening i found another part of code (ssetObj.Select acSelectionSetLast) that i will check too today

Edit : Thx for your answer it's working fine (mine not :p)

BlackBox
20th Apr 2011, 12:43 pm
Thx RenderMan,

yesterday in the late evening i found another part of code (ssetObj.Select acSelectionSetLast) that i will check too today

Edit : Thx for your answer it's working fine (mine not :p)

Your welcome. :)