Task 1 – Maze Recording
Actuary Forums › Forums › Learnings › Softwares › Excel VBA › Task › Macros › Recording macros and buttons › Task 1 – Maze Recording
- This topic is empty.
-
AuthorPosts
-
October 10, 2017 at 3:58 am #22705
Mayank Goyal
KeymasterUsing Microsoft Excel to record macros to take the strain out of repetitive tasks. Answer is given in the file itself
[attachment=0]Task 1 – Maze Recording.zip[/attachment] you’ll need to login and download and unzip the attached fileOpen the file found in the folder above.Record 4 macros to work as follows:
A new macro called
Down, such that when you press CTRL + Dthe macro takes you down one cell. A new macro called
Up, such that when you press CTRL + Uthe macro takes you up one cell. A new macro called
Left, such that when you press CTRL + Lthe macro takes you left one cell. A new macro called
Right, such that when you press CTRL + Rthe macro takes you right one cell. Test your macros out by starting in cell
B2and pressing the appropriate sequence of keys: The first sequence of keys is:CTRL + D
Now record a fifth macro called
Cheat, which takes you straight to the cell containing the gold, regardless of your current starting position. Think carefully about whether you should be recording in relative or absolute mode.
Add some buttons to your workbook to make these macros easier to run like UP, DOWN, RIGHT, LEFT and CHEAT
The buttons do not have to be perfectly aligned.
Answer: Try it yourself using & answer is given in the workbook itself.
[attachment=0]Task 1 – Maze Recording.zip[/attachment] https://support.office.com/en-us/article/Assign-a-macro-to-a-Form-or-a-Control-button-d58edd7d-cb04-4964-bead-9c72c843a283 -
AuthorPosts
- You must be logged in to reply to this topic.
Actuary Forums › Forums › Learnings › Softwares › Excel VBA › Task › Macros › Recording macros and buttons › Task 1 – Maze Recording