Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Trapping unrappable CompileTime errors (Word/VBA )

    Thanks fot that Chris.
    Regards
    Don

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

    Trapping untrappable CompileTime errors (Word/VBA)

    Word VBA (and possibly other manifestations) exhibits a peculiar tendency to generate a Compile Error at Run Time if the slave project to a master project is not present.
    A possible solution is presented here; the solution depends on Word/VBA not complaining about a Compile Error as a reference to an external function as long as the code module containing that reference isn't entered unwittingly. The solution makes use of a sentinel macro in the slave.

    The slave application contains at least one useful function

  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:Trapping untrappable CompileTime errors (Word/V

    You read it?
    You understand it?
    You ran it?
    It worked?
    I'm not crazy?

    I've read most of the threads on "programmatically setting references at run time" et al., and I already do that with a little installer I wrote. But still I've been concerned about using some of the applications as optional slaves to other applications. Someone is using WbWrd and doesn't want to use the indexing features I ought to let it run without baulking at a compile-time error for some code they don't intend to use anyway.
    As well, (ref my <post#=578,138>post 578,138</post#> 5 minutes ago), I always feel I ought to trap/detect any event at all by the time the product ships out the door.

  4. #4
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re:Trapping untrappable CompileTime errors (Word/V

    Hi Chris
    I read it.
    I think I understand it.
    I will run it.
    I'll let you know my success wrt it working.

    This whole concept of optional slaves is a new and intriguing concept to me.
    Regards
    Don

  5. #5
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re:Trapping untrappable CompileTime errors (Word/V

    Hi Chris

    Once again, thanks for the thoughts. I've now further studied your post and associated code. I've run it on my Word 2003 installed on an XP OS.

    Yes; it behaves exactly as you described.

    <hr>and I already do that with a little installer I wrote<hr>
    If you're interested in sharing, I'd like to study your installer.
    Regards
    Don

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

    Re:Trapping untrappable CompileTime errors (Word/V

    DW> If you're interested in sharing, I'd like to study your installer.
    The code in Setup.dot is unloacked and comes with anything that you download from my Download page.
    (Some Zips come with a fairly new Un-Installer).

    Try Nester if your VBS code is puritan (If/Then/Else always occupy separate lines) and you can tolerate a known bug (fails with "private type", "public type").
    Or try Under if you spend a lot of time in MSWord (Blog at http://underthewordhood.blogspot.com/).

  7. #7
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re:Trapping untrappable CompileTime errors (Word/V

    Thanks Chris
    I don't imagine that I will come to understand this within the week; but it will certainly pass the time.
    Regards
    Don

Posting Permissions

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