BUG: OLEcont MSDN Sample Does Not Allow a SaveAs Cancel (190199)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q190199 SYMPTOMS
When using the Microsoft Visual Basic sample application OLECont, the
following error may occur:
Path/File access error
This error occurs when the sample application is run and the user clicks
Cancel when attempting to use Save As from the File menu of the sample
application.
CAUSE
The CancelError property of the CommonDialog is not set to True. Therefore,
the run-time error is executed.
RESOLUTION
To allow the Common Dialog control to be cancelled during a Save, the
CancelError property of the CommonDialog should be set to True. The
following line of code allows the Cancel button to function correctly:
ParentForm.ActiveForm.CommonDialog1.CancelError = True
The line of code above should be entered into the OpenSave subroutine in
the ModOLECont module immediately below the following lines of the
subroutine, as follows:
Sub OpenSave(Action as String)
Dim Filenum
Filenum = FreeFile
'Insert line here to resolve Cancel button for CommonDialog1
ParentForm.ActiveForm.CommonDialog1.CancelError = True
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. We are researching this
bug and will post new information here in the Microsoft Knowledge
Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbbug KB190199 |
---|
|