View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Transferring Control From VBA Form to Spreadsheet

Depends how you are showing your userform. Make sure you show it modeless
Userform1.show vbmodeless

Then you can interact with the spread normally, whilst the userform is
showing.
If you are showing if modal, then you will have to hide it before you can
interact with the spreadsheet.

NickHK

"Tony LeGrand" wrote in message
...

Can someone explain how to transfer control (focus) to the Excel
Spreadsheet
temporarily, while continuing to have a VBA Form running in the
background?

In Visual Basic I used to do this with the SetWindowPos function found
in
the Windows "user32" API.

In VBA I don't know how to address window handles and keep my VBA Form
running. I am forced to exit my VBA code entirely if I want to do
anything
in the Excel form itself.

Thanks


--
Tony LeGrand
------------------------------------------------------------------------
Tony LeGrand's Profile: http://www.officehelp.in/member.php?userid=5042
View this thread: http://www.officehelp.in/showthread.php?t=1257106

Posted from - http://www.officehelp.in