I have over 20 subs in an excel file, and some userforms. In one userform, there is a cancel button, but I cannot use the "if cancel = true" kinda code in another sub. I don't know why, but it never comes true. So I thought that if I can state a variable to be true in userform, then check that variable in another sub, then that may work but unfortunately I couldn't figure that either. In below you can find both codes;
This is userform;
Private Sub Sheet_Iptal_Click()
Dim Sheet_Iptal As String
Sheet_Iptal = True
MsgBox "Islem iptal edildi."
Yeni_Sheet_Adi_Olustur.Yeni_Sheet.Value = ""
And here is the part of the other sub where I want to check that "Sheet_Iptal" situation;
If Sheet_Iptal = True Then
What I am basically trying to achieve in here is, if cancel button has been used, then go to "son" of that specific sub.
I am open to any suggestions here.