CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Timisoara, Romania
    Posts
    460

    Question excel saving problem

    Hello all,
    long time no see
    So here is my problem: I made an application to automate excel from vb6 and everything works fine, but if the xls file is opened from Excel in the same time I'm operating on it, doesn't want to save the changes. If the file is not opened from excel everything is OK and the changes are saved well. Anyone knows how to resolve this?
    Thanks!
    Last edited by vma; February 12th, 2007 at 03:39 AM.
    You liked it? Please show your gratitude and rate it!

    There is no 'patch' for stupidity.

  2. #2
    Join Date
    Feb 2007
    Location
    Finland
    Posts
    10

    Re: excel saving problem

    Hi,

    I am not so experienced but I nderstood that you are attempting to save data changes to the same file you are using at that moment. I had a similar problem for this in the word application. I couldn't solve the prob, neither I found a logical explanation for it. I was trying to save the changes from VB at the same time using the file, it seems to me that it is impossible. So I used a template and "SaveAs" code to save the data changes in another word file, which isn't a solution for your problem. I suggest you not to run excel with VBA at the same time, but as explained before I am no pro ) C ya...

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata, India
    Posts
    430

    Re: excel saving problem

    I have tested the same inder windows98 and with excel 2000 the same worked fine. I had made a package for my customer that opens excel from vb6. The same file can be saved by the user by making any alteration that is needed.

    But i do faced a problem with excel VBA. With excel VBA i created a file in Win98 and then when i opened the same file in XP and tried to save the system could not save it. It showed an error that cannot save the file.

    The basic idea regarding the same as i got from MS site is that the system is deleting the temporary file before attempting to save the changes. The problem is still there.
    Try, Try Hard, Try Harder one day you will Succeed.

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