Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Call Subroutine (Excel 2003)

    Hi

    I am trying to call a subroutine from a Workbook_Open procedure of "This Workbook" module of PERSONAL.xls.

    Any ideas please.

    Many thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Call Subroutine (Excel 2003)

    Where is the suboutine you want to call stored? Also in Personal.xls, or in another workbook?

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Call Subroutine (Excel 2003)

    Hi Hans

    It is in the Personal.xls

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Call Subroutine (Excel 2003)

    You can call a subroutine in the same workbook by simply using its name, optionally preceded by Call. For example, if your subroutine is named MyProc, you can use

    Private Sub Workbook_Open()
    MyProc
    End Sub

    or

    Private Sub Workbook_Open()
    Call MyProc
    End Sub

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Call Subroutine (Excel 2003)

    Hi Hans

    Thanks for your prompt reply.


    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

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