How To Automatically Run A Macro To Open An Excel Workbook

Excel is one of the best programs that make up the package Microsoft Office . This recognition he has earned through everyday use that make thousands of users around the world, who use their extraordinary tools . Href=”https://play.google.com/store/apps/details?id=com.microsoft.office.excel&hl=es”> capable multiplatform installation .

Excel Tools

To know absolutely all the Options you can get to provide this program can be somewhat difficult, as they seek to meet. Among this range of tools, are the macros. An important fact of macros is that can be edited and modified easily .

Something that can be really difficult at first, because it is a programming language. But once you master it, you will impress even more ease of handling Excel .

The macros in Microsoft Excel

Macros can be considered as instructions that can be executed sequentially or any other order .

 macros in Microsoft Excel

Its great value lies in create a macro in Excel documents can save a lot of time in cases of repetitive tasks through process automation. So, if you realize that you perform very regularly same table with different data, this can save a lot.

How are macros work?

To use macros, you must use the Visual Basic for Applications (VBA), the manager to create and modify macros you need for your Excel document.

Enable VBA in Excel

This method of creating macros with VBA is not visually available to all in Microsoft Excel. However, that does not mean you can not enable it. The goal is that may appear on your ribbon, the Developer tab. To do this, follow these steps:

  1. Position yourself on any tab in the Ribbon.
  2. Right-click to get a menu.
  3. Click on Customize Ribbon .
  4. You must check the box Developer and click OK.
  5. Go to the Developer tab and click Visual Basic . Then:
  6. Find and click on the Tools s.
  7. Select the Reference .
  8. Enables corresponding to box Microsoft VBScript Regular Expressions 5.5 and click OK.
  9. Automatic Macros

    Macros are very useful when repetitive tasks are performed, making Microsoft Excel into an automated system that will help you save time and effort to recreate all format of the document you made just hours before or the day before.

    How to adapt the macros to your needs?

    Macros can be run according to the schedule that you give. A time for action, to start a new sheet or a new book. This type of actions are known as events, and here you can learn how to program them.

    1. Enter to the VBA through the Developer .
    2. On the General bar to select the Worksheet , so you can work on the sheet.
    3. On the navigation bar to the side, Excel will offer a number of options to determine more quickly the option you want to perform.
    4.  macro adapt to your needs

      It is important to highlight that are used for actions that can be executed within the sheet. You can also instruct that certain actions are performed at the time of opening an Excel document:

      • To do this, instead of describing the commands on the sheet, you will click ThisWorkbook .
      • Similarly, select Worksheet in the options bar.
      • You send so default to the event Open , so will perform a certain action when opening a document.

      Simple examples

      This type of event can be a bit confusing . So, this time, you will learn to program some simple events.

      If you want that, opening an Excel file, want a dialog box appears, so it should be the box VBA:

      Private Sub Workbook_Open ()

      Msgbox “Hello!”

      End sub

      Remember that The book should be saved as macro-enabled Excel workbook , because otherwise, no instructions will run you set. If you want this dialog box each time you select a specific sheet appears in your book Excel, should be as follows:

      Private Sub Worksheet_Activate ()

      Msgbox “Who’s there?”

      You may also be interested in:

      End sub

      How useful did you find this content?

      Click on a star to rate!

      Average score 0 / 5. Counting of votes: 0

      So far, no votes. Be the first to rate this content.

      I'm sorry this content was not useful for you!

      Let me improve this content!

      Tell me, how can I improve this content?

Deja un comentario