Microsoft Excel has a Macro Recorder that lets you record workbook tasks and can help you to quickly learn macro programming. To run the Macro Recorder, click Tools>Macro>Macro Recorder from the menu. Please figure below.
Regularly, you find yourself searching the value 1,000 in column A together with other tasks and you want a program routine to automate the search.
Solution:
1.) Run the Macro Recorder.
2.) Select the whole Column A by clicking on the A header.
3.) Press Control-F to display the Find window.
4.) Enter 1000 in “Find what:” field and click “Find Next” button.
5.) Stop the Macro Recorder by clicking the stop button:
6.) The following source code is automatically generated by Excel:
Source Code:
There are many things that you can learn in using the Macro Recorder. You can learn the different objects that the built-in functionalities of Excel VBA programming language are using.
Click here to subscribe and receive Pro-business Excel VBA Programming tips. |
0 comments:
Post a Comment