Hi again,

Is there any way to create error handling that doesn't live inside your
original module? What I'd like to do is be able to add error handling that
lives outside my module, and can be easily updated.

For example, let's say that a new error is given to me by my users. I work
out what the error handling needs to be (e.g. ErrorMsg = MsgBox("Error
number: " & Err.Number & " - Document is locked by password." & vbCrLf &
"Please unprotect manually.", vbCritical, "Error!")) and then I can add this
to my error handling without updating the module itself. I update the
external file (which isn't in use)

I've got another thread open on PrivateProfileString, but I don't think it's
appropriate in this case. While I could use it to get custom error messages
(e.g. ErrorMsg =
System.PrivateProfileString("H:\Errorlist.ini",Err.Number,"Message") I
couldn't actually assign specific handling to the error. (That is, I couldn't
do like a Case statement, whereby it checks Err.Number against the case, and
when a case is found, runs specific code)

Any thoughts?

Thanks again,

Bob

Re: Create custom error handling outside of VBA by Jonathan

Jonathan
Wed Apr 02 00:40:54 PDT 2008


"Beeawwb" <Beeawwb@discussions.microsoft.com> wrote in message
news:D4DD2D6C-EBAA-476B-A691-F873F8989A1E@microsoft.com...
> Hi again,
>
> Is there any way to create error handling that doesn't live inside your
> original module? What I'd like to do is be able to add error handling that
> lives outside my module, and can be easily updated.

You can pass the error number to an external routine, but that will still
need to be within your project.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Re: Create custom error handling outside of VBA by Beeawwb

Beeawwb
Wed Apr 02 01:33:05 PDT 2008

Ok, the next thought that occurs to me (and one that probably makes a little
more sense now that I think about it...

The whole purpose of trying to keep things compartmentalised at this stage
is so I can deploy updates while people are still using the original module.

Is it possible to have a "Front End" module, contained in POL.dot, which
would just contain some code to call a routine from another template, say
backend.dot, which would only load backend.dot when it was actually called.
That being, backend.dot would not be loaded at Startup, like POL.dot

This would allow me to make changes to backend.dot, without having to wait
for everybody to go home. I guess it's sort of like an Access front-end /
back-end relationship.

-Bob

"Jonathan West" wrote:

>
> "Beeawwb" <Beeawwb@discussions.microsoft.com> wrote in message
> news:D4DD2D6C-EBAA-476B-A691-F873F8989A1E@microsoft.com...
> > Hi again,
> >
> > Is there any way to create error handling that doesn't live inside your
> > original module? What I'd like to do is be able to add error handling that
> > lives outside my module, and can be easily updated.
>
> You can pass the error number to an external routine, but that will still
> need to be within your project.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>

Re: Create custom error handling outside of VBA by Doug

Doug
Wed Apr 02 01:38:28 PDT 2008

See my response to your other post.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Beeawwb" <Beeawwb@discussions.microsoft.com> wrote in message
news:CC539BF7-ED8B-469A-814E-FEC9B01DB10B@microsoft.com...
> Ok, the next thought that occurs to me (and one that probably makes a
> little
> more sense now that I think about it...
>
> The whole purpose of trying to keep things compartmentalised at this stage
> is so I can deploy updates while people are still using the original
> module.
>
> Is it possible to have a "Front End" module, contained in POL.dot, which
> would just contain some code to call a routine from another template, say
> backend.dot, which would only load backend.dot when it was actually
> called.
> That being, backend.dot would not be loaded at Startup, like POL.dot
>
> This would allow me to make changes to backend.dot, without having to wait
> for everybody to go home. I guess it's sort of like an Access front-end /
> back-end relationship.
>
> -Bob
>
> "Jonathan West" wrote:
>
>>
>> "Beeawwb" <Beeawwb@discussions.microsoft.com> wrote in message
>> news:D4DD2D6C-EBAA-476B-A691-F873F8989A1E@microsoft.com...
>> > Hi again,
>> >
>> > Is there any way to create error handling that doesn't live inside your
>> > original module? What I'd like to do is be able to add error handling
>> > that
>> > lives outside my module, and can be easily updated.
>>
>> You can pass the error number to an external routine, but that will still
>> need to be within your project.
>>
>>
>> --
>> Regards
>> Jonathan West - Word MVP
>> www.intelligentdocuments.co.uk
>> Please reply to the newsgroup
>>
>>