#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default cursor position

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default cursor position

Private Sub Workbook_Open()
Worksheets("Sheet1").Cells(1, 1).Select
End Sub

Modify the sheet and cell as necessary

"MarkT" wrote:

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default cursor position

Yes:

The following macro will put the cursor in Z100 whenever the book is opened:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("Z100").Select
End Sub


must be put in ThisWorkbook code.
--
Gary's Student
gsnu200704


"MarkT" wrote:

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default cursor position

I entered in your macro as listed and ran it, and it indeed did work. I
saved the workbook and then opened it up again, however, the cursor was not
in the location that I specified in the macro.

Furthermore, when I went to edit the macro, it did not appear in the macro
window??? Not sure what's going on.

"Gary''s Student" wrote:

Yes:

The following macro will put the cursor in Z100 whenever the book is opened:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("Z100").Select
End Sub


must be put in ThisWorkbook code.
--
Gary's Student
gsnu200704


"MarkT" wrote:

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default cursor position

Mark

The code is to go into Thisworkbook module and is run automatically when the
workbook opens. Perhaps you didn't read that bit?

Copy the code as written then right-click on the Excel logo left of "File" on
the menu bar if window is maximized, on the Excel logo on window title bar if
not maximized.

Select "View Code". Paste the code into that module.

ALT + q to go back to Excel.

Choose another worksheet and cell.

Save/close and re-open to see Sheet1 and Z100 selected.

BTW......the reason it doesn't show in ToolsMacroMacros if you placed it in a
general module is the "Private" part.


Gord Dibben MS Excel MVP


On Tue, 6 Feb 2007 13:29:00 -0800, MarkT
wrote:

I entered in your macro as listed and ran it, and it indeed did work. I
saved the workbook and then opened it up again, however, the cursor was not
in the location that I specified in the macro.

Furthermore, when I went to edit the macro, it did not appear in the macro
window??? Not sure what's going on.

"Gary''s Student" wrote:

Yes:

The following macro will put the cursor in Z100 whenever the book is opened:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("Z100").Select
End Sub


must be put in ThisWorkbook code.
--
Gary's Student
gsnu200704


"MarkT" wrote:

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default cursor position

Hi Gord,

Thanks for your post; it worked as you stated.

After working with Excel for ten years I can't believe just how much that I
don't know, and how much I have to learn yet.

Thanks for having the patience with me and others like me in this forum!

"Gord Dibben" wrote:

Mark

The code is to go into Thisworkbook module and is run automatically when the
workbook opens. Perhaps you didn't read that bit?

Copy the code as written then right-click on the Excel logo left of "File" on
the menu bar if window is maximized, on the Excel logo on window title bar if
not maximized.

Select "View Code". Paste the code into that module.

ALT + q to go back to Excel.

Choose another worksheet and cell.

Save/close and re-open to see Sheet1 and Z100 selected.

BTW......the reason it doesn't show in ToolsMacroMacros if you placed it in a
general module is the "Private" part.


Gord Dibben MS Excel MVP


On Tue, 6 Feb 2007 13:29:00 -0800, MarkT
wrote:

I entered in your macro as listed and ran it, and it indeed did work. I
saved the workbook and then opened it up again, however, the cursor was not
in the location that I specified in the macro.

Furthermore, when I went to edit the macro, it did not appear in the macro
window??? Not sure what's going on.

"Gary''s Student" wrote:

Yes:

The following macro will put the cursor in Z100 whenever the book is opened:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("Z100").Select
End Sub


must be put in ThisWorkbook code.
--
Gary's Student
gsnu200704


"MarkT" wrote:

In Excel 2003, running XP Pro

Is there a way to have the cursor always be placed in a certain cell when a
workbook is opened up - regardless of where the user left it when they exited
out last?

Thanks for your help!

Mark



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



All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"