Macro Recorder Repeat

0 views
Skip to first unread message

Stetson Saenz

unread,
Aug 5, 2024, 10:50:19 AM8/5/24
to kelbcumpvanli
Unfortunatelyall of the macro things are based on the positions of the cursor on the screen, in an XY coordinate system, and there are a lot of things that affect where things appear on the screen. Screen size, desktop size, Windows font size, web browser font size, font, the website settings, need I go on....

Record the macro during the first step. Do a little optimisation and you are ready to repeat these steps as much as you want. It saves so much time which otherwise we would have to do each step manually which is very boring and prone to errors.


In my case the initial macro recording sometimes took few minutes to get it correct and optimised, but i should say it is worth the time spent if you need to repeat those same steps atleast 10 times or more.


It is existing to see the macro actions taking place within fraction of seconds which would otherwise take few seconds to do it manually. The playback is so fast that sometimes we cannot see what has happened, but when we go back and check, every changes we need are correctly made.


A loop is one of the most commonly used functions in automation. It allows recorded actions to be repeated until a specific effect is achieved. It is thanks to the creation of loops that the AUTOMADE tool performs time-consuming human tasks in an instant.


The second option is to create the loop after the macro has already been recorded. To do this, go to the Advanced view where you can see all the steps and select the ones you want to create a loop from. To select the steps:


The AUTOMADE tool allows you to create loops based on specific datasets, such as tables in Excel sheets or HTML tables. In their case, the loop will terminate when the data in the specific dataset is exhausted.


After recording this operation, in the advanced view we will see all the steps we recorded. At this point, the macro will correctly populate one PDF document, and it will look like this on the graph:


As you can see, a loop block has been created in the record set that groups all the loop steps together. The AUTOMADE tool has detected that the loop applies to the Excel sheet and will repeat the action until it runs out of names in the list.


When you record a macro, the macro recorder records all the steps in Visual Basic for Applications (VBA) code. These steps can include typing text or numbers, clicking cells or commands on the ribbon or on menus, formatting cells, rows, or columns, or even importing data from an external source, say, Microsoft Access. Visual Basic Application (VBA) is a subset of the powerful Visual Basic programming language, and is included with most Office applications. Although VBA gives you the ability to automate processes within and between Office applications, it is not necessary to know VBA code or computer programming if the Macro Recorder does what you want.


It is important to know that you when you record a macro, the Macro Recorder captures almost every move you make. So if you make a mistake in your sequence, for example, clicking a button that you did not intend to click, the Macro Recorder will record it. The resolution is to re-record the entire sequence, or modify the VBA code itself. This is why whenever you record something, it's best to record a process with which you're highly familiar. The more smoothly you record a sequence, the more efficiently the macro will run when you play it back.


When you record a macro for performing a set of tasks in a range in Excel, the macro will only run on the cells within the range. So if you added an extra row to the range, the macro will not run the process on the new row, but only the cells within the range.


It is not necessary that only tasks in Excel can be recorded in a macro. Your macro process can extend to other Office applications, and any other applications that support Visual Basic Application (VBA). For example, you can record a macro where you first update a table in Excel and then open Outlook to email the table to an email address.


To assign a keyboard shortcut to run the macro, in the Shortcut key box, type any letter (both uppercase or lowercase will work) that you want to use. It is best to use Ctrl + Shift (uppercase) key combinations, because the macro shortcut key will override any equivalent default Excel shortcut key while the workbook that contains the macro is open. For instance, if you use Ctrl+Z (Undo), you will lose the ability to Undo in that Excel instance.


Although the description field is optional, it is recommended you enter one. Also, try to enter a meaningful description with any information that may be useful to you or other users who will be running the macro. If you create a lot of macros, the description can help you quickly identify which macro does what, otherwise you might have to guess.


You can work with recorded code in the Visual Basic Editor (VBE) and add your own variables, control structures, and other code that the Macro Recorder cannot record. Since the macro recorder captures almost every step you take while recording, you can also clean up any unnecessary recorded code that serves no purpose in the macro. Reviewing your recorded code is a great way to learn or sharpen your VBA programming skills.


When you record a macro for performing a set of tasks in a range in Excel, the macro will only run on the cells within the range. So if you added an extra row to the range, the macro will not run the process on the new row, but only the cells within the original range.


To assign a keyboard shortcut to run the macro, in the Shortcut key box, type any letter (both uppercase or lowercase will work) that you want to use. It is best to use key combinations that don't correspond to existing shortcut keys, as a macro shortcut key will override any equivalent default Excel shortcut key while the workbook that contains the macro is open.


Although the description field is optional, it is recommended you enter one. It's helpful to enter a meaningful description with any information that may be useful to you or other users who will be running the macro. If you create a lot of macros, the description can help you quickly identify which macro does what, otherwise you might have to guess.


The easiest one: assign a hotkey to your macro (for example, Shift+Delete) via the Tools - Customize - Keyboard menu. Now just press and hold these keys until you see your entire document turn into one long paragraph.


The most difficult way (for you now it is really difficult, perhaps someday later): I will not describe it, it has been described many times. This is best described in the book by Andrew Pitonyak (eg chapter 7.14.4. Search and Replace with Attributes and Regular Expressions)


An unbearably difficult decision: try searching this resource for the answer. If you are lucky, then very quickly you will find, for example, this question and the answers to it.


Sorry it has taken me so long to respond. I am not sure if I forgot to check for an answer or I simply did not receive yours in time. I appreciate your response and will try them some time and see if they work better than what I did.


ME: I take as a criticism. I always search for answers to my questions for far too long most times before posting. The post described what you already shared about the find and replace options.


ME: While I realize that the Find and Replace options are ways of getting rid of the end spaces, however, it does not address my initial question which was: Now I would like to have this macro repeat until the end of the document. How do I do that?


This procedure would actually do the job without you explicitly specifying a cycle on your part (the cycle is there, but it is not visible in the procedure code, it is hidden inside the .uno:ExecuteSearch command)


No, this is not criticism or sarcasm - it was written quite sincerely and means exactly what is written: searching this resource is quite difficult even for veterans, not to mention newcomers. As far as I remember, I spent about an hour to find a link to said discussion for you. However, with a certain amount of luck, the right answer can be found almost instantly.


My apologies to you for taking your response as criticism. You have been very helpful. I too have spent much time looking through this forum for solutions and thought that you were being critical. my bad. By the way, I am not a newbie to the forum only to coding. Hats off to you for being kind and to the point, JohnSUN


ScriptLab is a plugin, and plugins can't perform operations like cropping an image. Unfortunately, I can't suggest much to you as far as Paint.NET. Paint.NET doesn't support batch processing. There are graphics programs specifically designed for batch processing, such as ImageMagick. There are also macro recorders such as Macro Recorder.


I am fairly new to VBA what i am hopping to do is to make this macro recording code repeat this on the Cell 1 then Cell 2 Then Cell 3 until there is no more data fields left in the A col. Basically its supposed to copy a Cell in A1 and copy to book 2 then hit refresh data then copy some Info back into Book1and repeat from A1 until there is no more cells with data left in the A column


Mouse Recorder Pro 2 2.0 is a freeware mouse recorder app and automation tool developed by Nemex for Windows. It's easy-to-use, advanced, professional, light on system resources, well-designed and efficient.


The download has been tested by an editor here on a PC and a list of features has been compiled; see below. We've also created some screenshots of Mouse Recorder Pro 2 to illustrate the user interface and show the overall usage and features of this mouse recording program.

3a8082e126
Reply all
Reply to author
Forward
0 new messages