Consulting

Results 1 to 7 of 7

Thread: Solved: opening excel file using VBA

  1. #1

    Smile Solved: opening excel file using VBA

    Hi Friends,
    I am New to VBA.

    I have a query.
    I am trying to open an excel file using VBA.
    Excel file is in server.
    am writting following code

    [VBA]Sub openworkbook()
    Workbooks.Open Filename:="\\server\exc\book1.xls "
    End Sub[/VBA]

    but am not able to open excel file.

    Please help me in this issue.

    Thanks in Advance

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    it wouldn't be that extra space at the end of:
    Filename:="\\server\exc\book1.xls "
    would it?
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Hi,
    Thanks for reply.
    Actually there is no space. I tried it.
    i kept exc folder also in shared mode...

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    what's the error message?
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    \\server\exc\book1.xls cannot be found. Check your spelling, or try a different path.

    I already checked spellings

    Thanku!

  6. #6
    Hi,
    My issue has been solved.
    The problem is with Sharing Permissions.
    Thanku!

  7. #7
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    mark it 'Solved' pls
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

Posting Permissions

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