CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011
    Posts
    35

    save excel file issue

    hi all,
    i use this code to fill an excel file
    ....
    Dim xlApp As Excel.Application
    Dim wbxl As Excel.Workbook
    Dim wDAT As Excel.Worksheet
    Dim wCEL As Excel.Range
    Set xlApp = CreateObject("Excel.Application")
    Set wbxl = xlApp.Workbooks.Open(sTABEL)
    Set wDAT = xlApp.Sheets(1)

    wDAT.Cells(3, 3).Value = xValue
    ....
    wbxl.Save (or SaveAs newFileName)
    xlApp.Workbooks.Close
    Set xlApp = Nothing

    the code work fine but under office 2010 when i try to save on error ocur.
    what i must to do to solve this issue ?
    i think, something is missing in my installing package, but what ?

    thanks in advance for any sigestion

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: save excel file issue

    This line is not valid
    Code:
    wbxl.Save (or SaveAs newFileName)
    Always use [code][/code] tags when posting code.

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