Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave,
While I was waiting for your response, I copied your code into a new macro within the workbook and saved it. I also renamed the last command to recognize a worksheet name. It works like a charm. Thanks a bunch. "Dave Peterson" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How too set last edited date in excel and which user was it? | Excel Worksheet Functions | |||
Using the Save As Webpage function in Excell | Excel Discussion (Misc queries) | |||
Automatically up date time in a cell | Excel Discussion (Misc queries) | |||
Excel "save as" function. | Excel Discussion (Misc queries) | |||
Excel :Save date function | Excel Worksheet Functions |