Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Excel macro

How do you 'kick off' a macro automatically when the excel spreadsheet is opened?
0
ff_axel
Asked:
ff_axel
1 Solution
 
pacificdbCommented:
Use a macro called "AutoExec".
0
 
stubbsCommented:
Name the macro Auto_Open

pacificdb: AutoExec is for Word macros that you want to run when you first start Word.
0
 
bruintjeCommented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now