ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Modeless window (https://www.excelbanter.com/excel-programming/320257-modeless-window.html)

Jos Vens[_2_]

Modeless window
 
Hi,

Is it possible when you open a modeless window (userform) to give the focus
back to the sheet you were working in, without waiting for a click of the
user in the sheet.

This lines did not do the job:

Set vSheet = ActiveSheet
myForm.Show False
vSheet.Select

or

vSheet.Activate

Thanks
Jos Vens




Norman Jones

Modeless window
 
Hi Jens,

Try:

AppActivate Application.Caption

---
Regards,
Norman



"Jos Vens" wrote in message
...
Hi,

Is it possible when you open a modeless window (userform) to give the
focus back to the sheet you were working in, without waiting for a click
of the user in the sheet.

This lines did not do the job:

Set vSheet = ActiveSheet
myForm.Show False
vSheet.Select

or

vSheet.Activate

Thanks
Jos Vens






Jos Vens[_2_]

Modeless window
 
Terrific! It works!

Thanks a lot
Jos


"Norman Jones" schreef in bericht
...
Hi Jens,

Try:

AppActivate Application.Caption

---
Regards,
Norman



"Jos Vens" wrote in message
...
Hi,

Is it possible when you open a modeless window (userform) to give the
focus back to the sheet you were working in, without waiting for a click
of the user in the sheet.

This lines did not do the job:

Set vSheet = ActiveSheet
myForm.Show False
vSheet.Select

or

vSheet.Activate

Thanks
Jos Vens








Norman Jones

Modeless window
 
Hi Jos,

Thanks for the feedback and apologies for mis-spelling your name!

---
Regards,
Norman



"Jos Vens" wrote in message
...
Terrific! It works!

Thanks a lot
Jos





All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com