Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Problem mapping procedure using OnKey Method

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Problem mapping procedure using OnKey Method

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-sheet mapping problem Titanus Excel Worksheet Functions 1 April 10th 06 04:31 AM
onkey method freekrill Excel Discussion (Misc queries) 1 October 12th 05 01:31 PM
Application.OnKey problem R Avery Excel Programming 0 July 8th 04 06:38 PM
Application.OnKey problem Phillip Reeves[_2_] Excel Programming 1 January 23rd 04 06:46 PM
Onkey Method Fred Lambelet Excel Programming 3 January 23rd 04 05:20 AM


All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"