hi, when i try to close a workbook with this vba
Public Sub Workbook_BeforeClose(cancel As Boolean)
utente = Application.UserName
sgBeforeClose (utente)
End Sub
Public Sub sgBeforeClose(utente)
MsgBox "utente"
End Sub
it works fine only if sub sgBeforeClose is in the same .xlsm.
When I move sgBeforeClose in other .xlsm I obtain sub non definited.
Thank for every help.
Public Sub Workbook_BeforeClose(cancel As Boolean)
utente = Application.UserName
sgBeforeClose (utente)
End Sub
Public Sub sgBeforeClose(utente)
MsgBox "utente"
End Sub
it works fine only if sub sgBeforeClose is in the same .xlsm.
When I move sgBeforeClose in other .xlsm I obtain sub non definited.
Thank for every help.