|
-
Jun 2nd, 2004, 03:03 AM
#4
Thread Starter
Frenzied Member
Hi BrianB,
Thanks loads for your reply. What I really need is;
1. I have instructed the user to open Excel.
2. Then check if he really did the action
3. After checking close it .
But I am getting both messages and the excel is not closing. Can you pls tell me why it is doing this. Your urgent reply is very much appreciated. Thanks.
---------------------------------------------------------------------------
Private Sub Command1_Click()
On Error GoTo IsClosed
If Not Workbooks("Book1") Is Nothing Then
MsgBox "Workbook is open"
Set objExcel = Nothing
Set objWorkBook = Nothing
objExcel.Quit
objWorkBook.Quit
Else
IsClosed: MsgBox "Workbook is not open."
End If
End Sub
--------------------------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|