Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    13

    Unanswered: Open two workbooks simultaneously

    How do I use VB to make a file (with a whole bunch of macros in it) open at the same time as opening another file?

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    you dont you have to open them sequentialy

    i.e.

    Code:
    Sub test()
        Dim wkb1 As Workbook
        Dim wkb2 As Workbook
        
        Set wkb1 = Workbooks.Open("c:\myfile1.xls")
        Set wkb2 = Workbooks.Open("c:\myfile2.xls")
        
        
    End Sub
    HTH
    Dave

  3. #3
    Join Date
    Feb 2005
    Posts
    2
    May be this could help you....



    Sub SchedullingAJob()
    Application.OnTime TimeValue("17:00:00"), "Procedure1"
    Application.OnTime TimeValue("17:00:00"), "Procedure2"
    End Sub
    Sub Procedure2()
    Dim wkb1 As Workbook
    Set wkb1 = Workbooks.Open("c:\myfile1.xls")
    End Sub

    Sub Procedure1()
    Dim wkb2 As Workbook
    Set wkb2 = Workbooks.Open("c:\myfile2.xls")
    End Sub

Posting Permissions

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