CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Excel

  1. #1
    Join Date
    Jul 2001
    Location
    Belgium
    Posts
    39

    Excel

    I'm bugfixing some app here but (unfortunately) have a very limited knowledge of VB. I have to open Excel and then save the file on a particular drive/folder. For this I have already found the following existing code:


    With ExcelApp
    .Application.Workbooks.Add
    .Visible = true
    .WindowState = xlMaximized
    .DefaultFilePath = "o:\document"
    End With




    When we use this and press 'save' or 'save as...' the save file dialog shows up but it's positioned in the 'personal' folder instead of 'o:\document'.
    Any way I can fix this?

    Many thanks.


    If anything in this post makes sense it was written by me, if not I don't know who wrote it

  2. #2
    Join Date
    Nov 2001
    Posts
    1

    Re: Excel

    You can use
    workbook.SaveAs Filename:=workbook.Name
    It will work I think


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured