ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Vying for the focus - Worksheet Vs Forms (https://www.excelbanter.com/excel-programming/305962-vying-focus-worksheet-vs-forms.html)

Adrian[_7_]

Vying for the focus - Worksheet Vs Forms
 
Hi,

In my VBA program, I have attempted to load 2 modeless forms upon
startup. After which, I wish to return the focus onto the worksheet named
"Sheet1". The code is written as show below:

" Private Sub Workbook_Open()

'Load modeless forms

form1.show 0
form2.show 0

ThisWorkbook.Activate
Sheet1.Activate
ActiveCell.Activate


End Sub

"

However, I was unable to do so and the focus remains at form2. What should I
do to ensure that the focus will stay at the worksheet instead of the forms
?


--
Regards,
Adrian




All times are GMT +1. The time now is 04:13 AM.

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