I don't know about macros. You might be able to use them to run code you
write. But if you are up to coding, you need to set a reference to the
'Microsoft Visual Basic for Applications Extensibility 5.3'. It provides
the interface for modifying/returning information about code modules.
The CodePane object returns information about the code/module being viewed
in the IDE. CodePane.CodeMo dule property will tell you which module is
being viewed in the in the IDE. Using the CodePane's GetSelection method you
can retrieve information about the currently selected text.
The CodeModule object allows to locate, identify, modify lines of code in a
particular module.
I have not checked to see what kind of documentation Microsoft has on
programming using the IDE object. You can use the object browser to look at
it and retrieve information about its object model, properties and methods.
Some Wrox Publishing books contain reference information about the IDE
object. The "Excel 2000 VBA Programmer's Reference" does and it is what 1st
introduced me the IDE object. I don't have my copy handy ( it is packed
away) so I just used the object browser to search out the information above.
--
Jeffrey R. Bailey
"Maercker Michael" <nc*********@ne tcologne.de> wrote in message
news:bl******** **@newsreader2. netcologne.de.. .
hi y'all!
i want to implement a few macros to help me do my coding; when calling a
macro: how i can i find out in which module i'm currently in; at which
position and what text i have selected. it's gotta be possible somehow,
but the screen-objekt really isn't of much help. can anyone help me?
thanks in advance!
mike maercker