how to execute a vba function automatically when openning the excel file

  • Thread starter Thread starter Ayoung Chueng
  • Start date Start date
You can either call a macro Auto_Open, or put the code in the Workbook_Open event, which goes in the ThisWorkbook code module.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ayoung Chueng" <[email protected]> wrote in message news:OISfjU%[email protected]...
 
Hi
two ways:
1. In your workbook module (not in a standard module) use the
Workbook_Open() event procedure

2. Rename your macro to Auto_Open()

--
Regards
Frank Kabel
Frankfurt, Germany

news:OISfjU#[email protected]...
 
Hi Ayoung Chueng,
Please do not post with an empty body or an empty subject
it is confusing and annoying. The subject should summarize
what is in the body. If it is short as you have, then
simply make them the same.

But an empty body looks like the question has not loaded.

Also once a question is
selected many of us, including myself, do not look at the
subject again, so also make sure that the entire question
is included in the body.

Thanks, and I assume you got the answers you were looking for.
-- David McRitchie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top