Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't step thru Workbook_BeforeClose

Status
Not open for further replies.

merlynsdad

Programmer
Nov 18, 2010
175
US
I can't step through my Workbook_BeforeClose procedure. It's not running correctly, and I need to check it. When I put the cursor beside "Private" and hit the step thru button nothing happens. Is stepping thru this procedure different than any other?
 
hi,

Please post your code, as my immaginer facility as apparently not working and probably would yield faulty results if it were.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Private Sub Workbook_BeforeClose(Cancel As Boolean)

''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''
'THIS MODULE CLOSES THE WORKBOOK AND EXCEL
'WITHOUT GIVING THE USER THE OPPORTUNITY TO SAVE
''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''
On Error Resume Next

Application.EnableEvents = False
Workbooks(cstrDatabaseWB).Close False
Me.Saved = True
Application.EnableEvents = True
Application.DisplayAlerts = False
Application.Quit

End Sub
 

I can't step through my Workbook_BeforeClose procedure.
You mean that you cannot step INTO the Workbook_BeforeClose procedure.

so...

put a BREAK in the first line of code.

close your workbook.

enter DEBUG.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top