PC Review


Reply
Thread Tools Rate Thread

Cursor Placement

 
 
=?Utf-8?B?QWRyaWVubmU=?=
Guest
Posts: n/a
 
      1st Nov 2007
I have a shared workbook which many users on different shifts modify daily.
Two users are complaining that every time they open the workbook, the cursor
defaults to a particular cell, rather then to the last place they worked
before saving and closing. If they do a "Find" before moving the cursor from
that particular cell,
the response is that the information is not found - even though the
information is there on the sheet.
Is there any way to prevent the cursor from reverting to that same cell each
time the workbook opens?
--
"A"
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmlsbHkgTGlkZGVs?=
Guest
Posts: n/a
 
      2nd Nov 2007
You have to save the information before saving the workbook right-click on
the Excel Icon by the File menu and select View Code. The code will go there

On the left drop down box Choose Workbook - this will enter a Workbook_Open
declaration. Leave it for now and move the cursor below the End sub line.

Click the right dropdown button and choose a Before save event. When you
have tweeked the code below you can copy it ignoring the sub and End Sub lines

I added a sheet to a workbook and called it StartUp on the sheet tab

I put this table in
User Name Sheet Cell
Jim Sheet2 $B$11
Fred
Jill

I used this in an ordinary modue to test the code. You would paste the code
between A Workbook_Open sub. Test 1 is Before Save and Test2 is Open

Sub test1()
'workbook before_save event
v = Application.UserName
sh = ActiveSheet.Name
addr = ActiveCell.Address

Application.ScreenUpdating = False
Sheets("StartUp").Select
Select Case v
Case "Jim"
Cells(2, 2) = sh
Cells(2, 3) = addr
Sheets(sh).Select
Range(addr).Select
Case "Fred"
'more code
End Select
Application.ScreenUpdating = True
End Sub


Sub test2()
'workbook_open event
v = Application.UserName
Application.ScreenUpdating = False
Sheets("Startup").Select
Select Case v
Case "Jim"
sh = Cells(2, 2)
addr = Cells(2, 3)
Sheets(sh).Select
Range(addr).Select
Case "Fred"
'more code
End Select
Application.ScreenUpdating = True
End Sub

Hope this helps
Peter


"Adrienne" wrote:

> I have a shared workbook which many users on different shifts modify daily.
> Two users are complaining that every time they open the workbook, the cursor
> defaults to a particular cell, rather then to the last place they worked
> before saving and closing. If they do a "Find" before moving the cursor from
> that particular cell,
> the response is that the information is not found - even though the
> information is there on the sheet.
> Is there any way to prevent the cursor from reverting to that same cell each
> time the workbook opens?
> --
> "A"

 
Reply With Quote
 
=?Utf-8?B?QWRyaWVubmU=?=
Guest
Posts: n/a
 
      3rd Nov 2007
I will try that.
Thank you, Billy.
--
"A"


"Billy Liddel" wrote:

> You have to save the information before saving the workbook right-click on
> the Excel Icon by the File menu and select View Code. The code will go there
>
> On the left drop down box Choose Workbook - this will enter a Workbook_Open
> declaration. Leave it for now and move the cursor below the End sub line.
>
> Click the right dropdown button and choose a Before save event. When you
> have tweeked the code below you can copy it ignoring the sub and End Sub lines
>
> I added a sheet to a workbook and called it StartUp on the sheet tab
>
> I put this table in
> User Name Sheet Cell
> Jim Sheet2 $B$11
> Fred
> Jill
>
> I used this in an ordinary modue to test the code. You would paste the code
> between A Workbook_Open sub. Test 1 is Before Save and Test2 is Open
>
> Sub test1()
> 'workbook before_save event
> v = Application.UserName
> sh = ActiveSheet.Name
> addr = ActiveCell.Address
>
> Application.ScreenUpdating = False
> Sheets("StartUp").Select
> Select Case v
> Case "Jim"
> Cells(2, 2) = sh
> Cells(2, 3) = addr
> Sheets(sh).Select
> Range(addr).Select
> Case "Fred"
> 'more code
> End Select
> Application.ScreenUpdating = True
> End Sub
>
>
> Sub test2()
> 'workbook_open event
> v = Application.UserName
> Application.ScreenUpdating = False
> Sheets("Startup").Select
> Select Case v
> Case "Jim"
> sh = Cells(2, 2)
> addr = Cells(2, 3)
> Sheets(sh).Select
> Range(addr).Select
> Case "Fred"
> 'more code
> End Select
> Application.ScreenUpdating = True
> End Sub
>
> Hope this helps
> Peter
>
>
> "Adrienne" wrote:
>
> > I have a shared workbook which many users on different shifts modify daily.
> > Two users are complaining that every time they open the workbook, the cursor
> > defaults to a particular cell, rather then to the last place they worked
> > before saving and closing. If they do a "Find" before moving the cursor from
> > that particular cell,
> > the response is that the information is not found - even though the
> > information is there on the sheet.
> > Is there any way to prevent the cursor from reverting to that same cell each
> > time the workbook opens?
> > --
> > "A"

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cursor placement =?Utf-8?B?bXptc3No?= Microsoft Word New Users 1 26th May 2007 10:31 PM
Cursor Placement Microsoft Outlook 1 29th Sep 2004 02:00 AM
Cursor Placement Austin Mihalik Microsoft Excel Worksheet Functions 2 9th Jul 2003 04:52 PM
Re: Cursor Placement Ron de Bruin Microsoft Excel Misc 0 9th Jul 2003 04:50 PM
Cursor Placement Andy Edwards Microsoft Word Document Management 2 30th Jun 2003 07:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 AM.