Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transferring Control From VBA Form to Spreadsheet


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

In Visual Basic I used to do this with the SetWindowPos function foun
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 d
anything
in the Excel form itself.

Thank

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

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transferring Control From VBA Form to Spreadsheet


Thankyou Nick.

Exactly what I needed

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

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

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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Transferring from one form to another Helpme Excel Discussion (Misc queries) 8 October 9th 08 12:03 AM
Opening a workbook withAuto-open Macros without transferring control [email protected] Excel Programming 0 November 3rd 06 12:13 AM
Transferring information from one user form to another [email protected] Excel Programming 1 August 17th 06 11:51 PM
Spreadsheet Control on User Form Paul Worthington Excel Programming 0 June 29th 04 03:09 PM


All times are GMT +1. The time now is 09:20 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"