a click button on a form will 'close' the webbrowser open the excel form behind the scene edit it ,save and show again on the webbrowser... however i receive this error : "xxx.xls already exist in this location.Do you want to save it..."
when i try to debug it line by line (ie.F8 on this click button) there is no error till the end of the sub!....(the problem lies on the .save statement... wat wnet wrong ....dunnno which object has not close properly...

VB Code:
  1. Dim name1
  2.  
  3. Private Sub Command1_Click()
  4.         With Me.CommonDialog1
  5.                 .DialogTitle = "Select Office Document to Display"
  6.                 .Filter = "Excel Documents " & _
  7.             "(*.xls)|*.xls|"
  8.                 .ShowOpen
  9.        
  10.         If .FileName <> "" Then
  11.             name1 = .FileName
  12.             Me.WebBrowser1.Navigate .FileName
  13.          End If
  14.         End With
  15.    
  16. End Sub
  17.  
  18. Private Sub Command2_Click()
  19. Me.WebBrowser1.Navigate "about:blank"
  20.  
  21. Dim wat As Excel.Application
  22. Set wat = CreateObject("Excel.Application")
  23.  
  24. wat.Workbooks.Open FileName:="C:\123.xls"
  25.  
  26. Range("G9:G10").Select
  27. wat.ActiveSheet.Pictures.Insert( _
  28.         "C:\sig.bmp").Select
  29.        
  30. wat.ActiveWorkbook.Save
  31. wat.Quit
  32. Set wat = Nothing
  33.  
  34. WebBrowser1.Navigate name1
  35.  
  36.      
  37. End Sub
  38.  
  39. Private Sub Form_Load()
  40. WebBrowser1.Navigate "about:blank"
  41.  
  42. End Sub