L
lmv
I want to have a reminder on program close no matter what is used to close it
to disconnect the linked xl sheets the utilities form OR the program close X.
Have you disconnected the xl sheets?
OR BETTER YET
Have a script run to automatically disconnect them IF they are connected.
Now I have a buttons on the Utilities form but each xl sheet is seperate.
'--------
Private Sub cmdDisOrig_Click()
On Error GoTo Err_cmdDisOrig_Click
Dim curDatabase As Object
Set curDatabase = CurrentDb
curDatabase.TableDefs.Delete "Co-Orig_xls"
MSGBOX "The Linked Orig Excel sheet has been disconnected"
Exit_cmdDisOrig_Click:
Exit Sub
Err_cmdDisOrig_Click:
MSGBOX "Error " & "CO-ORIG.xls is NOT Connected"
Resume Exit_cmdDisOrig_Click
End Sub
'-----------
Private Sub cmdDeletexl_Click()
On Error GoTo Err_cmdDeletexl_Click
Dim curDatabase As Object
Set curDatabase = CurrentDb
curDatabase.TableDefs.Delete "CO-new_xls"
MSGBOX "The Linked Excel sheet COnew has been disconnected"
Exit_cmdDeletexl_Click:
Exit Sub
Err_cmdDeletexl_Click:
MSGBOX "Error " & "EXCEL NOT Connected"
Resume Exit_cmdDeletexl_Click
End Sub
'____
Any ideas?
Thanks!
to disconnect the linked xl sheets the utilities form OR the program close X.
Have you disconnected the xl sheets?
OR BETTER YET
Have a script run to automatically disconnect them IF they are connected.
Now I have a buttons on the Utilities form but each xl sheet is seperate.
'--------
Private Sub cmdDisOrig_Click()
On Error GoTo Err_cmdDisOrig_Click
Dim curDatabase As Object
Set curDatabase = CurrentDb
curDatabase.TableDefs.Delete "Co-Orig_xls"
MSGBOX "The Linked Orig Excel sheet has been disconnected"
Exit_cmdDisOrig_Click:
Exit Sub
Err_cmdDisOrig_Click:
MSGBOX "Error " & "CO-ORIG.xls is NOT Connected"
Resume Exit_cmdDisOrig_Click
End Sub
'-----------
Private Sub cmdDeletexl_Click()
On Error GoTo Err_cmdDeletexl_Click
Dim curDatabase As Object
Set curDatabase = CurrentDb
curDatabase.TableDefs.Delete "CO-new_xls"
MSGBOX "The Linked Excel sheet COnew has been disconnected"
Exit_cmdDeletexl_Click:
Exit Sub
Err_cmdDeletexl_Click:
MSGBOX "Error " & "EXCEL NOT Connected"
Resume Exit_cmdDeletexl_Click
End Sub
'____
Any ideas?
Thanks!