Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling an Excel File from a Network Drive (2000)

    Is it possible, within Access, to call up an Excel file from a network drive?

    Here's my code:

    Private Sub cmdExcel_Click()
    On Error GoTo Err_cmdExcel_Click

    Dim oApp As Object

    Set oApp = CreateObject("Excel.Application")
    oApp.Documents.Open "VATASHEETACQ2003 2004 Spending.xls"
    oApp.Visible = True
    'Only XL 97 supports UserControl Property
    On Error Resume Next
    oApp.UserControl = True

    Exit_cmdExcel_Click:
    Exit Sub

    Err_cmdExcel_Click:
    MsgBox Err.Description
    Resume Exit_cmdExcel_Click

    End Sub

    When I try to do this, it's giving me the following error:

    "Object doesn't support this property or method"

    I have gone to Tools -> References and set the Microsoft Excel 9.0 Object Library.

    Thanks for your help,
    Kindra

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling an Excel File from a Network Drive (2000)

    <P ID="edit" class=small>(Edited by D Willett on 04-Sep-03 17:56. Path was to my network folder L: instead of your V:)</P>kinaida

    Try the following:

    Dim oApp As Object
    Set oApp = CreateObject("Excel.Application")
    oApp.workbooks.Open "VATASHEETACQ2003 2004 Spending.xls"
    oApp.Visible = True
    'Only XL 97 supports UserControl Property
    On Error Resume Next
    oApp.UserControl = True

  3. #3
    2 Star Lounger
    Join Date
    Apr 2003
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calling an Excel File from a Network Drive (2000)

    Perfect! Thanks very much!!!

    <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

Posting Permissions

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