Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Procedure finishes prematurely (VBA Word 2000)

    I start with a click event. The last item in the click event calls procedure A in a separate module that starts running correctly. Procedure A calls procedure B. Procedure B calls a few other modules (one of which includes setting a reference) and then ends WITHOUT going back to finish procedure A.

    Any ideas why this might happen?

    Thanks!!
    Troy

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure finishes prematurely (VBA Word 2000)

    Without seeing the code, about the only thing I can think of is one of the procedures has an End statement.

    What you might try and do is step through the code and see where it fails.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    4 Star Lounger
    Join Date
    Apr 2001
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Procedure finishes prematurely (VBA Word 2000)

    I don't have an end statement, except of course for the "End Sub" at the end of each procedure, but if that procedure was called by a previous procedure, it normally goes back to "Parent" procedure and continues on.

    While testing this on another machine than I was using on my original post, it seems that the sub is ending on the following statement:

    Templates(GlobTemplatePathAndName).Saved = True

    Two different times in different procedures this stops. I've confirmed that the variable "GlobTemplatePathAndName" is defined correctly. By the way, it refers to a global template file installed.

    Why would this step be ending the procedure run?

    Thanks for any help you can give!!
    Troy

Posting Permissions

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