1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Rep Power

    vb and excel

    Could someone tell me how I can set up a vb macro to run in excel when you open the spreadsheet.

    I have a navigation form for the spreadsheet and I want it to be the first thing that is viewed when the user opens the spreadsheet.

  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Somewhere in the great unknown
    Rep Power
    Open the vba editor (Alt + F11) and double-click on the ThisWorkbook object in the project list. In the code window that opens click on the first dropdown that has "(General)" in it and click on "Workbook", this should open and create a sub called Private Sub Workbook_Open()

    load and show your form from this sub.

    Also, in the future please use an appropriate subject title. You can refer to the sticky thread at the top of this forum on how to post a question for more information.

IMN logo majestic logo threadwatch logo seochat tools logo