Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Mouse stops responding after error handler

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Quick - 26 Aug 2007 03:17 GMT
A word document is ceasing to respond to mouse commands after an error
handler displays a msgbox.  Cursor commands and keyboard still work in
the document.  The mouse still works on toolbars and menus but not the
scroll bars.  Very strange.  Happens regurly with this template.

Only fix is to restart word.

Rebuilt the template with no change.
Started word with the /a switch, no change.
Ran WORD detect and repair with no change.

Have the members of this forum observed this behavior before?

Configuration:
XP with service pack 2
Word 2003

TIA

Greg

Code for the error handler shown below.
> '-------------------------------------
>    On Error GoTo 0                   ' Cancel Error Handler
>    GoTo AutoOpen_ExitSub     ' Skip to Exit
> '-------------------------------------Error Handler V3.03 dated 28 July 2007
> AutoOpen_Error:              ' Error handler
>    Dim errNextError As ClassErrObject:   Set errNextError = New ClassErrObject
>     Select Case Err.Number
>             Case Else 'Standard error no change
>                 'strTempErr = "  "
>                 'Err.Description = strTempErr
>                 'booErrorBreak = False
>     End Select ' Case Err.Number
>
>     Call errNextError.Add(Err.Number, Err.Source, constThisTemplateName, _
>             mconststrModulename, _
>             strMacroName, strErrLabel, Err.Description, _
>             Err.HelpContext, strFullHelpFileName)
>     errNextError.Break = booErrorBreak 'Allow continue after some errors
>    
>     Call GetErrDescr(errNextError) ' set custom message and helpfiel context
>     If booLogErrors = True Then Call errNextError.LogErrorMessage
>     Call errNextError.ShowErrorMessage
>     If errNextError.Break = False Then ' Resume next cleanup
>         Err.Clear
>         Set errNextError = Nothing
>         Resume Next
>     End If
>  
> AutoOpen_ErrorCleanup:   'Cleanup for error crash
>    Err.Clear
>    Application.ScreenUpdating = True
>    If errNextError.Break = True Then End
>    Set errNextError = Nothing
>    Exit Sub
> '-----------------------------------------------------------------------
> AutoOpen_ExitSub:        'Single exit point for all jumps
>   Application.ScreenUpdating = True
> End Sub
Shauna Kelly - 26 Aug 2007 15:41 GMT
Hi Greg

I've certainly experienced code that caused the mouse to stop operating so
that it was no longer possible to click within the document and/or to use
the scroll bars.

The only solution I've ever found is to test the code and identify the line
of code that is causing the problem. In your own case, that will include
investigating the routines that your code is calling.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

>A word document is ceasing to respond to mouse commands after an error
>handler displays a msgbox.  Cursor commands and keyboard still work in the
[quoted text clipped - 58 lines]
>>   Application.ScreenUpdating = True
>> End Sub
Greg Quick - 04 Sep 2007 11:35 GMT
> Hi Greg
>
[quoted text clipped - 73 lines]
>>>   Application.ScreenUpdating = True
>>> End Sub

The problem was an attempt to read a custom property in the attached
template was making the document unstable.

Thank you for your efforts.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.