Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-20
2
Medium Priority
?
484 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

971 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