Nah untuk membuat Tombol close (X) worksheet gak berfungsi bisa coba memasukkan scrib ini pada
Thisworkbook
Public myFlg As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Letakkan ini pada "ThisWorkbook"
If myFlg = True Then Exit Sub
Application.DisplayAlerts = False
Cancel = True
End Sub
Sub myClose()
myFlg = True
Application.DisplayAlerts = False
ActiveWindow.Close False
End Sub
Thisworkbook
Public myFlg As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Letakkan ini pada "ThisWorkbook"
If myFlg = True Then Exit Sub
Application.DisplayAlerts = False
Cancel = True
End Sub
Sub myClose()
myFlg = True
Application.DisplayAlerts = False
ActiveWindow.Close False
End Sub
Ass..Mas Fatho Rahman, sy ingin tanya ne Mas.. kalou tombol X (Close) di UserForm VBA kita rubah langsung menjadi tombol Quit Aplikasi excel, itu gmn caranya mas.. terima kasih..
BalasHapus