Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Run a macro on opening of workbook.

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Can you make a macro run when you open a workbook. I need it to select a printer.

  2. #2
    . MrExcel's Avatar
    Join Date
    Feb 2002
    Location
    Merritt Island Florida
    Posts
    865
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, on the ThisWorkbook object, put the code in the Workbook_Open module.

    You want to somewhat follow the instructions in this tip:
    http://www.mrexcel.com/tip055.shtml

    but instead of putting the code in the Workbook_BeforePrint module, choose Open from the right dropdown above the Code window.

    Bill
    View a collection of recent Excel articles in the Excel Daily News

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •