Solved

Excel macro

Posted on 2000-05-06
3
348 Views
Last Modified: 2010-05-02
How do you 'kick off' a macro automatically when the excel spreadsheet is opened?
0
Comment
Question by:ff_axel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:pacificdb
ID: 2784030
Use a macro called "AutoExec".
0
 

Expert Comment

by:stubbs
ID: 2784330
Name the macro Auto_Open

pacificdb: AutoExec is for Word macros that you want to run when you first start Word.
0
 
LVL 44

Accepted Solution

by:
bruintje earned 40 total points
ID: 2785912
in your Excel workbook

open the Code editor with ALT + F11
then insert this code in the thisworkbook object

Private sub Workbook_Open()
  msgbox "opening1"
end sub

or preferable..insert a new module

and insert this code

sub Auto_open()
  msgbox "opening2"
end sub

both will run on the open, but the first is a bit troublesome when debugging code...

HTH:O)Bruintje
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question