Running a Macro in MS Excel When Opening a Workbook

Video Preview

Summary: To run a macro in Microsoft Excel when opening a workbook, open the "Code Editor" and adjust workbook preferences. Record a macro in Excel for opening a workbook with these tips from a software developer in this free video about computer technology.

Views:
531
Presenter
By Dave Andrews
eHow Presenter

Dave Andrews is a software developer with a business and Web site selling programs and other computer services in Franklin, Tenn. Having worked in the IT industry for more than 8...read more

Post a Comment

Post a Comment

Video Transcript

"Hi. My name's Dave Andrews. Today, I'm going to show you how to run a macro in Excel when opening a workbook. Let's open up Excel by clicking on the Start button, go into All Programs, Microsoft Office and let's launch Excel. Now this is our workbook that contains multiple sheets. Let's open up the code editor by going to Alt, pressing F11. You'll see here in your list that you have This Workbook. Let's double click on This Workbook. Under General, let's change it to Workbook and the open function is selected by default. What we're going to do is have a little screen pop up when the workbook is open. So, go click on Insert. Let's say User Form. Let's drop a little text label on here, which is this big letter A. And under the Properties, in captions, let's just type "Welcome to my workbook" and press Enter. We could resize this where it fits a little better. Now, go back to the Code Editor by double clicking again on This Workbook. In the workbook open function, simply type "User form 1.show" Let's go back to Excel by clicking on the Excel icon. And we're going to save this workbook with macros enabled. Click on the Office button and Save As Macro Enabled Workbook. I'm going to name this My Workbook. Let's close it and reopen it and then we'll see that our macro is running. Click on the Start button and select Close. And then click on the button again, say Open and select My Workbook. Here's our user form that says Welcome to my workbook. My name is Dave Andrews and I've just showed you how to run a macro when opening a workbook."

eHow Article: Running a Macro in MS Excel When Opening a Workbook

Related Ads

  • Have you done this? Click here to let us know.
Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

eHow Computers
eHow_eHow Technology and Electronics