B
Brad
Hello, I'm having a problem that I was hoping .enableevents = false would
solve but it doesn't work at all. The events are still being triggered. The
problem is when I activate the userform, it triggers events that are
associated with the particular object. Below is my code with comments next to
the lines that have events that are being triggered: How can I stop these
events from triggering? I've tried Application.EnableEvents = False but it's
not stopping them.
Code-
Private Sub UserForm_Activate()
Application.EnableEvents = False
On Error Resume Next
Startdate.Value = Range("e56").Value 'event gets triggered
Enddate.Value = Range("h56").Value 'event gets triggered
TextBox697.Value = Sheets("data").Range("F9").Value 'event gets triggered
TextBox23.Value = Sheets("data").Range("J101").Value * 100 & "%" 'event
gets triggered
If Sheets("data").Range("abselect1").Value = "Y" Then
Abuse1.Value = True
End If
If Sheets("data").Range("inwarnty1").Value = "Y" Then
inwty1.Value = True
End If
Term1.Value = Range("trm1").Value
LP1.Value = Sheets("data").Range("line1lp").Value 'event gets triggered
SP1.Value = Sheets("data").Range("line1sp").Value 'event gets triggered
Total1.Value = Sheets("data").Range("Line1tot").Value 'event gets
triggered
EOS1.Value = Sheets("data").Range("eosdte1").Value 'event gets triggered
ComboBox1.Value = Sheets("data").Range("model1").Value 'event gets
triggered
Application.EnableEvents = True
solve but it doesn't work at all. The events are still being triggered. The
problem is when I activate the userform, it triggers events that are
associated with the particular object. Below is my code with comments next to
the lines that have events that are being triggered: How can I stop these
events from triggering? I've tried Application.EnableEvents = False but it's
not stopping them.
Code-
Private Sub UserForm_Activate()
Application.EnableEvents = False
On Error Resume Next
Startdate.Value = Range("e56").Value 'event gets triggered
Enddate.Value = Range("h56").Value 'event gets triggered
TextBox697.Value = Sheets("data").Range("F9").Value 'event gets triggered
TextBox23.Value = Sheets("data").Range("J101").Value * 100 & "%" 'event
gets triggered
If Sheets("data").Range("abselect1").Value = "Y" Then
Abuse1.Value = True
End If
If Sheets("data").Range("inwarnty1").Value = "Y" Then
inwty1.Value = True
End If
Term1.Value = Range("trm1").Value
LP1.Value = Sheets("data").Range("line1lp").Value 'event gets triggered
SP1.Value = Sheets("data").Range("line1sp").Value 'event gets triggered
Total1.Value = Sheets("data").Range("Line1tot").Value 'event gets
triggered
EOS1.Value = Sheets("data").Range("eosdte1").Value 'event gets triggered
ComboBox1.Value = Sheets("data").Range("model1").Value 'event gets
triggered
Application.EnableEvents = True