ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Move curser to specific cell when closing (https://www.excelbanter.com/excel-worksheet-functions/116576-move-curser-specific-cell-when-closing.html)

Richard

Move curser to specific cell when closing
 
I'd like to have Sheet2 cell B3 the active cell when closing workbook. I know
the code goes in Workbook_BeforeClose(Cancel as Boolean). I just don't know
how to word it? Thanks in advance

Gary''s Student

Move curser to specific cell when closing
 
Hi Richard:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet2").Activate
Range("B3").Select
End Sub

By the way, this is a good practice.
--
Gary''s Student


"Richard" wrote:

I'd like to have Sheet2 cell B3 the active cell when closing workbook. I know
the code goes in Workbook_BeforeClose(Cancel as Boolean). I just don't know
how to word it? Thanks in advance



All times are GMT +1. The time now is 03:17 PM.

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