P
peter.thompson
Am using the following code to make sure user closes a form correctly
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode A
Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "You must use the form 'close' button", 64, "Erro
Message"
End If
End Sub
I have 60 userforms. Rather than apply code in each form, is there
way to universally apply this to all forms in the workbook??
Follow up question, is it possible to remove the Microsoft "X" at th
top right hand side of the UserForm??
Any help much appreciated
Peter (new to VBA...slowly getting there, thanks to all the good advic
from this forum!
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode A
Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "You must use the form 'close' button", 64, "Erro
Message"
End If
End Sub
I have 60 userforms. Rather than apply code in each form, is there
way to universally apply this to all forms in the workbook??
Follow up question, is it possible to remove the Microsoft "X" at th
top right hand side of the UserForm??
Any help much appreciated
Peter (new to VBA...slowly getting there, thanks to all the good advic
from this forum!