PC Review


Reply
Thread Tools Rate Thread

Setting the focus

 
 
Orf Bartrop
Guest
Posts: n/a
 
      8th Aug 2006
I have created a spreadsheet requiring data to be entered in a set
order. By that I mean the first entry will be in the first blank cell in
column "B".
On pressing "Enter" I want the focus to move to C, D, E, F then M, N and O.
Two questions:
How do I get Excel to open with the focus in the first blank cell in
column B?
How do I set the movement of the focus on pressing "Enter"?
The cells between column F and M are calculated cells and do not need to
be selected. The cell in column A has the date automatically calculated
when data is added to cell B, C or D.
Please make your reply simple for me to follow as I am rather ignorant
as far as VB is concerned.

Orf
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxhdGhhbQ==?=
Guest
Posts: n/a
 
      8th Aug 2006
This takes a few steps to get to work exactly the way you want it to.

First, the coding part. Enter this into the Workbook code section using the
Visual Basic Editor

Option Explicit

Private Sub Workbook_Open()
Worksheets("Sheet1").Select
Range("B65536").End(xlUp).Offset(1, 0).Select
End Sub

To get into the VB Editor, start by pressing [Alt]+[F11] then look at the
Project window and double-click the entry in the 'tree' that says "This
Workbook". If you don't see the Project window (left side of the screen,
upper left 1/3rd of the screen) choose View | Project from the menu bar.

This presumes that the first empty cell in column B will be at the end of a
list of entries in that column, and that there are not empty cells within
filled in cells in that column. If the sheet name you need to go to is
something other than "Sheet1", change that, of course.

To get your cursor to move from Left to Right across the sheet instead of
top to bottom, go to
Toos | Options and choose the [Edit] tab. Find the entry that says "Move
Selection After Enter" and check the box next to it and change the direction
from "Down" to "Right"

Now that doesn't stop the cursor from stopping in cells in between the
columns you want it to stop at. Here's how to "fix" that:

Choose the columns where you do want the user to enter information into and
then use Format | Cells and uncheck the box next to "Locked" on the
[Protection] tab. You will want to do this for all columns that you want the
user to be able to enter information into, as B, C, D, E, F, M, N and O. Go
back to your worksheet and choose
Tools | Protection | Protect Sheet
and clear the checkbox next to the entry that says Select Locked Cells.
Whether or not you assign a password as being required to unlock the sheet is
up to you. Until you test it and make sure it works, I'd just leave it blank
that way all you have to do is choose Tools | Protection | Unprotect Sheet to
work in it some more.

This should set you up to work the way you want it all to work.

"Orf Bartrop" wrote:

> I have created a spreadsheet requiring data to be entered in a set
> order. By that I mean the first entry will be in the first blank cell in
> column "B".
> On pressing "Enter" I want the focus to move to C, D, E, F then M, N and O.
> Two questions:
> How do I get Excel to open with the focus in the first blank cell in
> column B?
> How do I set the movement of the focus on pressing "Enter"?
> The cells between column F and M are calculated cells and do not need to
> be selected. The cell in column A has the date automatically calculated
> when data is added to cell B, C or D.
> Please make your reply simple for me to follow as I am rather ignorant
> as far as VB is concerned.
>
> Orf
>

 
Reply With Quote
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
Thank you, I will try this later today.

JLatham wrote:

>This takes a few steps to get to work exactly the way you want it to.
>
>First, the coding part. Enter this into the Workbook code section using the
>Visual Basic Editor
>
>Option Explicit
>
>Private Sub Workbook_Open()
> Worksheets("Sheet1").Select
> Range("B65536").End(xlUp).Offset(1, 0).Select
>End Sub
>
>To get into the VB Editor, start by pressing [Alt]+[F11] then look at the
>Project window and double-click the entry in the 'tree' that says "This
>Workbook". If you don't see the Project window (left side of the screen,
>upper left 1/3rd of the screen) choose View | Project from the menu bar.
>
>This presumes that the first empty cell in column B will be at the end of a
>list of entries in that column, and that there are not empty cells within
>filled in cells in that column. If the sheet name you need to go to is
>something other than "Sheet1", change that, of course.
>
>To get your cursor to move from Left to Right across the sheet instead of
>top to bottom, go to
>Toos | Options and choose the [Edit] tab. Find the entry that says "Move
>Selection After Enter" and check the box next to it and change the direction
>from "Down" to "Right"
>
>Now that doesn't stop the cursor from stopping in cells in between the
>columns you want it to stop at. Here's how to "fix" that:
>
>Choose the columns where you do want the user to enter information into and
>then use Format | Cells and uncheck the box next to "Locked" on the
>[Protection] tab. You will want to do this for all columns that you want the
>user to be able to enter information into, as B, C, D, E, F, M, N and O. Go
>back to your worksheet and choose
>Tools | Protection | Protect Sheet
>and clear the checkbox next to the entry that says Select Locked Cells.
>Whether or not you assign a password as being required to unlock the sheet is
>up to you. Until you test it and make sure it works, I'd just leave it blank
>that way all you have to do is choose Tools | Protection | Unprotect Sheet to
>work in it some more.
>
>This should set you up to work the way you want it all to work.
>
>"Orf Bartrop" wrote:
>
>
>
>>I have created a spreadsheet requiring data to be entered in a set
>>order. By that I mean the first entry will be in the first blank cell in
>>column "B".
>>On pressing "Enter" I want the focus to move to C, D, E, F then M, N and O.
>>Two questions:
>>How do I get Excel to open with the focus in the first blank cell in
>>column B?
>>How do I set the movement of the focus on pressing "Enter"?
>>The cells between column F and M are calculated cells and do not need to
>>be selected. The cell in column A has the date automatically calculated
>>when data is added to cell B, C or D.
>>Please make your reply simple for me to follow as I am rather ignorant
>>as far as VB is concerned.
>>
>>Orf
>>
>>
>>

 
Reply With Quote
 
=?Utf-8?B?SkxhdGhhbQ==?=
Guest
Posts: n/a
 
      9th Aug 2006
I believe all of that should take you to the point you've asked for. If you
have any difficulty with inserting the code or finding your way around in the
VB Editor, hopefully the information I've provided on this page will help:
http://www.jlathamsite.com/Teach/WorkbookCode.htm


"Orf Bartrop" wrote:

> Thank you, I will try this later today.
>
> JLatham wrote:
>
> >This takes a few steps to get to work exactly the way you want it to.
> >
> >First, the coding part. Enter this into the Workbook code section using the
> >Visual Basic Editor
> >
> >Option Explicit
> >
> >Private Sub Workbook_Open()
> > Worksheets("Sheet1").Select
> > Range("B65536").End(xlUp).Offset(1, 0).Select
> >End Sub
> >
> >To get into the VB Editor, start by pressing [Alt]+[F11] then look at the
> >Project window and double-click the entry in the 'tree' that says "This
> >Workbook". If you don't see the Project window (left side of the screen,
> >upper left 1/3rd of the screen) choose View | Project from the menu bar.
> >
> >This presumes that the first empty cell in column B will be at the end of a
> >list of entries in that column, and that there are not empty cells within
> >filled in cells in that column. If the sheet name you need to go to is
> >something other than "Sheet1", change that, of course.
> >
> >To get your cursor to move from Left to Right across the sheet instead of
> >top to bottom, go to
> >Toos | Options and choose the [Edit] tab. Find the entry that says "Move
> >Selection After Enter" and check the box next to it and change the direction
> >from "Down" to "Right"
> >
> >Now that doesn't stop the cursor from stopping in cells in between the
> >columns you want it to stop at. Here's how to "fix" that:
> >
> >Choose the columns where you do want the user to enter information into and
> >then use Format | Cells and uncheck the box next to "Locked" on the
> >[Protection] tab. You will want to do this for all columns that you want the
> >user to be able to enter information into, as B, C, D, E, F, M, N and O. Go
> >back to your worksheet and choose
> >Tools | Protection | Protect Sheet
> >and clear the checkbox next to the entry that says Select Locked Cells.
> >Whether or not you assign a password as being required to unlock the sheet is
> >up to you. Until you test it and make sure it works, I'd just leave it blank
> >that way all you have to do is choose Tools | Protection | Unprotect Sheet to
> >work in it some more.
> >
> >This should set you up to work the way you want it all to work.
> >
> >"Orf Bartrop" wrote:
> >
> >
> >
> >>I have created a spreadsheet requiring data to be entered in a set
> >>order. By that I mean the first entry will be in the first blank cell in
> >>column "B".
> >>On pressing "Enter" I want the focus to move to C, D, E, F then M, N and O.
> >>Two questions:
> >>How do I get Excel to open with the focus in the first blank cell in
> >>column B?
> >>How do I set the movement of the focus on pressing "Enter"?
> >>The cells between column F and M are calculated cells and do not need to
> >>be selected. The cell in column A has the date automatically calculated
> >>when data is added to cell B, C or D.
> >>Please make your reply simple for me to follow as I am rather ignorant
> >>as far as VB is concerned.
> >>
> >>Orf
> >>
> >>
> >>

>

 
Reply With Quote
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
Works fine thank you.

Orf

JLatham wrote:

>This takes a few steps to get to work exactly the way you want it to.
>
>First, the coding part. Enter this into the Workbook code section using the
>Visual Basic Editor
>
>Option Explicit
>
>Private Sub Workbook_Open()
> Worksheets("Sheet1").Select
> Range("B65536").End(xlUp).Offset(1, 0).Select
>End Sub
>
>To get into the VB Editor, start by pressing [Alt]+[F11] then look at the
>Project window and double-click the entry in the 'tree' that says "This
>Workbook". If you don't see the Project window (left side of the screen,
>upper left 1/3rd of the screen) choose View | Project from the menu bar.
>
>This presumes that the first empty cell in column B will be at the end of a
>list of entries in that column, and that there are not empty cells within
>filled in cells in that column. If the sheet name you need to go to is
>something other than "Sheet1", change that, of course.
>
>To get your cursor to move from Left to Right across the sheet instead of
>top to bottom, go to
>Toos | Options and choose the [Edit] tab. Find the entry that says "Move
>Selection After Enter" and check the box next to it and change the direction
>from "Down" to "Right"
>
>Now that doesn't stop the cursor from stopping in cells in between the
>columns you want it to stop at. Here's how to "fix" that:
>
>Choose the columns where you do want the user to enter information into and
>then use Format | Cells and uncheck the box next to "Locked" on the
>[Protection] tab. You will want to do this for all columns that you want the
>user to be able to enter information into, as B, C, D, E, F, M, N and O. Go
>back to your worksheet and choose
>Tools | Protection | Protect Sheet
>and clear the checkbox next to the entry that says Select Locked Cells.
>Whether or not you assign a password as being required to unlock the sheet is
>up to you. Until you test it and make sure it works, I'd just leave it blank
>that way all you have to do is choose Tools | Protection | Unprotect Sheet to
>work in it some more.
>
>

 
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
emulating window.focus in Body onload() event and setting focus to a control on same page Jason Microsoft ASP .NET 4 7th May 2007 07:54 PM
SETTING FOCUS!!!!!! =?Utf-8?B?TXIuIFNtaWxleQ==?= Microsoft Access 3 16th Aug 2006 09:37 PM
Setting Focus =?Utf-8?B?cGpzY290dA==?= Microsoft Access Form Coding 2 14th Mar 2006 09:21 PM
re:Setting the Focus? CometJoe Microsoft C# .NET 0 2nd Sep 2004 06:02 PM
DataGrid setting DataSource setting focus to grid Shravan Microsoft C# .NET 0 10th Nov 2003 07:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:46 PM.