Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    obtaining names of procedures

    Is there an fast method for obtaining names of procedures when generating code in Word97/VBA?

    When I'm in the VBA code for a form module, I can type "me." w/o quotes, and be presented with a list of available procedures.

    I'd love to make use of a similar device in a regular (non-form) code module, but can't work out what it should be.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: obtaining names of procedures

    This is one of those procedures I always mean to write and never get around to. As far as I know, it would involve stepping through the modules line by line and identifying the procedures based on the "Sub Whatever(" or "Function Whatever(" strings.

    In a class module (i.e., a form module), procedures are methods and properties of the class. That's why they show up like that. And you can never use Me to refer to a standard module, only to class objects.
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: obtaining names of procedures

    > stepping through the modules line by

    I can do that. Not a problem. That's how I build a cross-reference list of procedures for the procedure Stripper (strips unreferenced procs from a template). That technique won't help me at the typing-program-code stage.

    >procedures are methods and properties of the class

    That's why I can't do what i want in a regular module.

    I feel an exploratory series of "Class Modules" posts coming on .... (runs shrieking an dducking for cover ....)

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: obtaining names of procedures

    They're only scary before you get to know them, Chris. After that, they're just ugly.[img]/S/grin.gif[/img]
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •