ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   "show office assistant" greyed out; code suspect (https://www.excelbanter.com/excel-discussion-misc-queries/173148-show-office-assistant-greyed-out%3B-code-suspect.html)

mikewillnot

"show office assistant" greyed out; code suspect
 
With Excel 2003 sp2, Windows XP-sp2:

I have a file with some code (below) in various procedures to check
for & turn off / on the assistant, code I developed a long time ago.
The file crashed today somehow. After the crash, the code all hangs
there. This has happened now and then, and I could clear it by
manually turning the assistant on and running it again. However,
Excel now has a greyed out "show office assistant" button under Help,
and my normal trickery doesn't work. Can't get it back to its normal
mode.

Any suggestions would be GREATLY appreciated. THANKS.

Here's the code, and the error message:

The error fires at
oAssist.On = True
and says
method "on" of object "Assistant" failed.

Dim oAssist As Object, ASS As Integer
Set oAssist = Assistant
If Val(Application.Version) = 9 Then
If oAssist.On = True Then
ASS = 1
Else
Set oAssist = Assistant
oAssist.On = True
ASS = 2
oAssist.Visible = False
End If
End If



All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com