Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using the OnKey Method to map a keyboard sequence to a procedure in my form frmDFPanel. However, when I run my code below, an error occurs. Can someone please help ? Thanks. The code is as follows : In "ThisWorkbook", the code is as follows: " Private Sub Workbook_Open() 'Load DFPanel frmDFPanel.Show 0 'Mapping the keyboard ... Application.OnKey "+{Left}", "frmDFPanel.test" End Sub " In the form, frmDFPanel, the code is as follows: " Public Sub test() MsgBox "Sub procedure within form activated!" End Sub " The error message is as follows: " The macro "D:\Project\DFFS.xls'!frmDFPanel.test' cannot be found! " -- Regards, Kok Hsing (Guoxing) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think the problem is in the ThisWorkbook part. the code
behind the form is in forms.(look at your project window.) why is the code behind the form. try moving it to this workbook. -----Original Message----- Hi, I am using the OnKey Method to map a keyboard sequence to a procedure in my form frmDFPanel. However, when I run my code below, an error occurs. Can someone please help ? Thanks. The code is as follows : In "ThisWorkbook", the code is as follows: " Private Sub Workbook_Open() 'Load DFPanel frmDFPanel.Show 0 'Mapping the keyboard ... Application.OnKey "+{Left}", "frmDFPanel.test" End Sub " In the form, frmDFPanel, the code is as follows: " Public Sub test() MsgBox "Sub procedure within form activated!" End Sub " The error message is as follows: " The macro "D:\Project\DFFS.xls'!frmDFPanel.test' cannot be found! " -- Regards, Kok Hsing (Guoxing) . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multi-sheet mapping problem | Excel Worksheet Functions | |||
onkey method | Excel Discussion (Misc queries) | |||
Application.OnKey problem | Excel Programming | |||
Application.OnKey problem | Excel Programming | |||
Onkey Method | Excel Programming |