GrapeCity Forums

The GrapeCity Message Boards
Welcome to GrapeCity Forums Sign in | Join | Help
in Search

vb6 crashed after export to excel function

Last post 06-29-2009, 1:49 PM by SureshD. 3 replies.
Sort Posts: Previous Next
  •  06-29-2009, 7:39 AM 79594

    vb6 crashed after export to excel function

    Hello 

    I just got your Version 8 from Spread  . We are programming in vb6 

    we wrote a little excel like program .

    it stores all data in exported  excel files from your spread.

     

    it is called from  a menu by  a function like :

     

    call myExcel.load (name of file) 

     

    so the selected excel file is coming  up when loaded .

     

    when we type now something   in this loaded  file and press save (so do : spread.exporttoexcel ("test.xls,"") 

     

    it save s the file then we want to exit the program by : unload me  

     

    It jumps back to the calling menu (form) and then it hangs like as if it had not finished something   before exiting the form with unload me ????? 

    Then vb6 is hanging completely and we have to kill the vb6 task .........

     Any Idea ? Do I have to reset spread before I exit a form or something like this ??

     

    And all this was running with the same code with spread 7 without any problems ! 

     

    Best regards

     

    Michael 

     

  •  06-29-2009, 10:34 AM 79606 in reply to 79594

    Re: vb6 crashed after export to excel function

    Hello Michael,

    With Spread 8.0.07  I tested the behavior descibed by you, I found it working absolutely fine.Below is the code snippet that I used,

    Private Sub Command1_Click()
    fpSpread1.ImportExcelBook "D:\Work\Training\customers1000.xls", "D:\Work\Training\customers1000.log"
    End Sub
    Private Sub Command2_Click()
    fpSpread1.ExportExcelBook "D:\Work\Training\customers1000.xls", "D:\Work\Training\customers1000.log"
    End Sub
    Private Sub Command3_Click()
    Unload Me
    End Sub

     

    Let me know if I am missing something.

    Regards,


    Deepak Sharma
    GrapeCity FarPoint
  •  06-29-2009, 10:56 AM 79608 in reply to 79606

    Re: vb6 crashed after export to excel function

    Hello 

     

    I did it the same , but one form was calling another form .

     

    try to make a main form with a button .

    make another second form with a little excel form with spread in it and build in it a function

    like loadfile.

     

    now in the main form if you press the button you call secondform.loadfile(test.xls)

    so when you exit the secondform with unload me it jumps back to this point .

     

    make a save button in second form and make your : export excelbook.

     

    and a exit button with unload me

     

    now run the main form .

    press the button . type something . press save button  and exit ...

    after exit button and opening again the main form  

    then it should hang .

     

    sorry i am not so good in explanining ...

    regards Michael 

  •  06-29-2009, 1:49 PM 79616 in reply to 79608

    Re: vb6 crashed after export to excel function

    Hello,

    Could you please post a zipped sample project replicating the reported issue?

    Thanks


    Suresh Singh Dasila
    GrapeCity FarPoint
View as RSS news feed in XML
     FarPoint Forums Home