Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Moving cursor to A1 after save function

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Moving cursor to A1 after save function

Does it have to be *after* the save, or can it be immediately before?

If the latter, put this in the ThisWorkbook code module:

Private Sub Workbook_BeforeSave( _
ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
Application.Goto _
Reference:=ActiveSheet.Range("A1"), _
Scroll:=True
End Sub


In article ,
Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Moving cursor to A1 after save function

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ActiveSheet.Range("A1").Select
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Steve" wrote in message
...
I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a
command
within Excel?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Moving cursor to A1 after save function

Or program the home key to take them to the first cell.

How about Ctrl-Home?

--
Jim
"Steve" wrote in message
...
|I am trying to get the cursor to go to the first cell after a person saves.
| Or program the home key to take them to the first cell. Is there a
command
| within Excel?


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Moving cursor to A1 after save function

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?


"Jim Rech" wrote:

Or program the home key to take them to the first cell.


How about Ctrl-Home?

--
Jim
"Steve" wrote in message
...
|I am trying to get the cursor to go to the first cell after a person saves.
| Or program the home key to take them to the first cell. Is there a
command
| within Excel?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Moving cursor to A1 after save function

Put this tiny macro in ThisWorkbook code:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Range("A1").Select
End Sub

If you are unfamiliar with VBA, See:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Gary's Student
gsnu200701


"Steve" wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Moving cursor to A1 after save function

ctrl+Home

"Steve" wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Moving cursor to A1 after save function

Won't this be irritating to users who are editing cell x9999 and hit the Save
icon?

If you want A1 selected when the workbook opens, you may want to select A1 when
the workbook opens--not when it was saved.

Option Explicit
sub auto_Open()
dim wks as worksheet
for each wks in thisworkbook.worksheets
application.goto wks.range("a1"),scroll:=true
next wks
'change this to start at the worksheet you want
thisworkbook.worksheets("sheet99999").select
end sub

just a thought.


Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Moving cursor to A1 after save function

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?

"Dave Peterson" wrote:

Won't this be irritating to users who are editing cell x9999 and hit the Save
icon?

If you want A1 selected when the workbook opens, you may want to select A1 when
the workbook opens--not when it was saved.

Option Explicit
sub auto_Open()
dim wks as worksheet
for each wks in thisworkbook.worksheets
application.goto wks.range("a1"),scroll:=true
next wks
'change this to start at the worksheet you want
thisworkbook.worksheets("sheet99999").select
end sub

just a thought.


Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Moving cursor to A1 after save function

Just what I wrote earlier.

Didn't that help?

Steve wrote:

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?

"Dave Peterson" wrote:

Won't this be irritating to users who are editing cell x9999 and hit the Save
icon?

If you want A1 selected when the workbook opens, you may want to select A1 when
the workbook opens--not when it was saved.

Option Explicit
sub auto_Open()
dim wks as worksheet
for each wks in thisworkbook.worksheets
application.goto wks.range("a1"),scroll:=true
next wks
'change this to start at the worksheet you want
thisworkbook.worksheets("sheet99999").select
end sub

just a thought.


Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?


--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Moving cursor to A1 after save function

Dave,

I am not a macro guy. If I create a macro, when would it run and would it
run automatically?

"Dave Peterson" wrote:

Just what I wrote earlier.

Didn't that help?

Steve wrote:

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?

"Dave Peterson" wrote:

Won't this be irritating to users who are editing cell x9999 and hit the Save
icon?

If you want A1 selected when the workbook opens, you may want to select A1 when
the workbook opens--not when it was saved.

Option Explicit
sub auto_Open()
dim wks as worksheet
for each wks in thisworkbook.worksheets
application.goto wks.range("a1"),scroll:=true
next wks
'change this to start at the worksheet you want
thisworkbook.worksheets("sheet99999").select
end sub

just a thought.


Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

--

Dave Peterson


--

Dave Peterson

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Moving cursor to A1 after save function

Put the routine in a General module--not behind a worksheet and not behind
ThisWorkbook.

By naming the routine Auto_Open, it'll run each time the workbook is opened--if
the user allows macros to run.

Since you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

ps. Make sure you change that line to have a worksheet name that exists in your
workbook.

Steve wrote:

Dave,

I am not a macro guy. If I create a macro, when would it run and would it
run automatically?

"Dave Peterson" wrote:

Just what I wrote earlier.

Didn't that help?

Steve wrote:

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?

"Dave Peterson" wrote:

Won't this be irritating to users who are editing cell x9999 and hit the Save
icon?

If you want A1 selected when the workbook opens, you may want to select A1 when
the workbook opens--not when it was saved.

Option Explicit
sub auto_Open()
dim wks as worksheet
for each wks in thisworkbook.worksheets
application.goto wks.range("a1"),scroll:=true
next wks
'change this to start at the worksheet you want
thisworkbook.worksheets("sheet99999").select
end sub

just a thought.


Steve wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,814
Default Moving cursor to A1 after save function

Thanks to all. After reading through these response, what I am really trying
to do is have a person who opens the file automatically be taken to the first
worksheet upon opening and all subsequent worksheet would be back to cell A1.
Many times people hit the save button in a cell that is far from the
beginning and when the next person comes in, they have to manually get to the
top. I want to alleviate this problem. Your thoughts?


"Steve" wrote:

I am trying to get the cursor to go to the first cell after a person saves.
Or program the home key to take them to the first cell. Is there a command
within Excel?

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
How too set last edited date in excel and which user was it? jinlarse Excel Worksheet Functions 5 March 23rd 06 02:26 PM
Using the Save As Webpage function in Excell Dustin Excel Discussion (Misc queries) 1 October 17th 05 04:17 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
Excel "save as" function. help me please! Excel Discussion (Misc queries) 1 May 6th 05 01:06 AM
Excel :Save date function Elodie Excel Worksheet Functions 1 November 25th 04 04:25 PM


All times are GMT +1. The time now is 08:40 PM.

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"