keesantens
Gebruiker
- Lid geworden
- 29 sep 2012
- Berichten
- 17
Hoi HVS en edoor,
Ik heb het gevonden, als ik Application.Quit uit Thisworkbook verwijder werkt het prima!
Dus de juiste code om via de knop af te sluiten is:
Sub Diagram29_Klikken()
Dim w As Workbook, y As Long
For Each w In Workbooks
y = y + 1
Next
If y = 1 Then
ThisWorkbook.Save
Application.Quit
Else
ThisWorkbook.Close True
End If
End Sub
Bedank voor al jullie moeite
Prettige jaarwisseling,
Kees
Ik heb het gevonden, als ik Application.Quit uit Thisworkbook verwijder werkt het prima!
Dus de juiste code om via de knop af te sluiten is:
Sub Diagram29_Klikken()
Dim w As Workbook, y As Long
For Each w In Workbooks
y = y + 1
Next
If y = 1 Then
ThisWorkbook.Save
Application.Quit
Else
ThisWorkbook.Close True
End If
End Sub
Bedank voor al jullie moeite
Prettige jaarwisseling,
Kees