Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Send Keys to Open Userform

Is it possible to SendKeys to an Open/ Running Userform from another
macro once that Userform is waiting for a user action, say using
accelerator keys. It seems I can only do this from the keyboard once
the Userform is open. Thanks Gang! My turn to try answering some
questions too. Best, J
  #2   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Send Keys to Open Userform

'xxxxxxxxxxxxxxxxxxxxxx
'in the standard module
Sub test()
UserForm1.Show 0
End Sub

Sub YourMacro()
UserForm2.Show 0
End Sub

'xxxxxxxxxxxxxxxxxxxxxxx
'in the userform1 module

Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
'Ctrl+k
Debug.Print KeyCode
If KeyCode = 17 And Shift = 2 Then
YourMacro
End If
End Sub

regards
r

--
http://excelvba.altervista.org/blog/...ternative.html


"mrkt_rwnd" wrote:

Is it possible to SendKeys to an Open/ Running Userform from another
macro once that Userform is waiting for a user action, say using
accelerator keys. It seems I can only do this from the keyboard once
the Userform is open. Thanks Gang! My turn to try answering some
questions too. Best, J

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
need help using send keys funkymonkUK[_184_] Excel Programming 1 June 16th 06 01:41 PM
SEND KEYS?????? Please.... help... nisgore Excel Programming 1 October 20th 05 11:59 AM
Send Keys Sgwapt Excel Programming 1 August 7th 05 02:03 AM
Send Keys [email protected] Excel Programming 0 August 21st 03 08:13 PM
Send Keys pancho[_14_] Excel Programming 1 August 21st 03 07:54 PM


All times are GMT +1. The time now is 07:52 PM.

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

About Us

"It's about Microsoft Excel"