PRB: Error 438 Using TabOrder Sample Add-in (192443)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q192443 SYMPTOMS
When the TabOrder sample Add-In has focus in the Visual Basic integrated
development environment (IDE), shortcut keys (such as Alt+F for the File menu)
are trapped and not passed properly. This results in the following error
message:
Run-time error '438':
Object doesn't support this property or method
RESOLUTION
Follow these steps to edit the TabOrder.vbp project. For the location of
this project, see the MORE INFORMATION section later in this article. - Add the following function to the docTabOrder user document:
Public Function Hwnd()
Hwnd = UserDocument.Hwnd
End Function
- Edit the HandleKeyDown procedure in the modMain module to read as
follows:
Sub HandleKeyDown(ud As Object, KeyCode As Integer, Shift As Integer)
On Error GoTo ErrExit
If Shift <> 4 Then Exit Sub
If KeyCode < 65 Or KeyCode > 90 Then Exit Sub
If gVBInstance.DisplayModel = vbext_dm_SDI Then Exit Sub
If hwndMenu = 0 Then hwndMenu = FindHwndMenu(ud.hwnd)
PostMessage hwndMenu, WM_SYSKEYDOWN, KeyCode, &H20000000
KeyCode = 0
SetFocus hwndMenu
Exit Sub
ErrExit:
End Sub
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbAddIn kbcode kberrmsg kbide kbpending kbprb KB192443 |
---|
|