ImgEdit SaveAs ShowStoppers - file gets eaten up

sm43
09-01-2003, 10:37 PM
I get these errors from time-to-time when saving images:


Automation Error: Object has disconnected from its clients.

or

Method 'SaveAs of object '_DImgEdit 'failed.'


In both cases, the file that I have open in the Image Edit control gets deleted from the File System.




I'm opening the file using:


With ImgAdmin1
'.Filter = "All Image Files(*.tif, *.bmp, *.awd, *.jpg) |*.tif; *.bmp; *.awd; *.jpg |All files (*.*)|*.*|"
.Filter = "All Image Files |*.bmp; *.jpg; *.tif| " & _
"Bitmap Files(*.bmp)|*. bmp| JPG Files (*.jpg)|*.jpg|" & _
"TIFF Files (*.tif)|*.tif|All Files (*.*)|*.*|"
.FilterIndex = 3

.InitDir = couponPath
.CancelError = True
On Error GoTo CancelOut
.ShowFileDialog OpenDlg
On Error GoTo OtherError

ImgEdit1.Image = .Image
End With


I'm saving using:

With ImgAdmin1
.Filter = "All Image Files |*.bmp; *.jpg; *.tif| " & _
"Bitmap Files(*.bmp)|*. bmp| JPG Files (*.jpg)|*.jpg|" & _
"TIFF Files (*.tif)|*.tif|All Files (*.*)|*.*|"

.FilterIndex = 3
imgpath = .Image
.InitDir = couponPath 'sets the initial directory
.CancelError = True
On Error GoTo CancelOut
.ShowFileDialog SaveDlg
On Error GoTo OtherError
ImgEdit1.SaveAs ImgAdmin1.Image
End With


Has anyone encountered these errors? What is the way to get rid of them?


Saad

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum