Solved

vba - move selection right on enter during workbook open event and reset on close

Posted on 2013-01-20
2
472 Views
Last Modified: 2013-01-20
Hello Experts,

Is there an application event I can had at workbook open that will move the cursor to the right instead of down after enter is depressed. And on Workbook close event, have it switch it back to move cursor down.

I need it for this workbook and want to make it easier than having the end-user struggle with the cursor moving in the wrong directioin or having them change the advanced settings and switch it back.

I would need this to work in 2003 and 2010 versions.

Thanks for any advice / help,
mike637
0
Comment
Question by:mike637
2 Comments
 
LVL 18

Accepted Solution

by:
Curt Lindstrom earned 500 total points
ID: 38799335
Try this as Workbook macros:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.MoveAfterReturnDirection = xlDown
End Sub

Private Sub Workbook_Open()
Application.MoveAfterReturnDirection = xlToRight
End Sub

Open in new window


Cheers,
Curt
0
 

Author Closing Comment

by:mike637
ID: 38799344
You guys make it too easy!

Thanks alot,
Michael
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now