Hello,
I have the following issue:
Whenever I open the UserForm1 it does not execute all the codes except for the code that actually makes it Show. I found that everytime I open it I have to close it again and then re-open it for the codes to actually execute.
The following code is what I´m currently using:
Sub UserForm1_Open()
'Open userform "Resterende Info"
UserForm1.Show
'codes for showing the value of additional cells in the UserForm1 page "Kjøpsavtale"
UserForm1.TextBox1.Value = Sheet3.Range("C20")
UserForm1.TextBox2.Value = Sheet3.Range("C21")
UserForm1.TextBox3.Value = Sheet3.Range("C22")
UserForm1.TextBox4.Value = Sheet3.Range("C23")
UserForm1.TextBox5.Value = Sheet3.Range("C24")
UserForm1.TextBox6.Value = Sheet3.Range("C25")
UserForm1.TextBox7.Value = Sheet3.Range("C26")
UserForm1.TextBox8.Value = Sheet3.Range("C27")
UserForm1.TextBox9.Value = Sheet3.Range("I20")
UserForm1.TextBox10.Value = Sheet3.Range("I22")
UserForm1.TextBox11.Value = Sheet3.Range("I24")
UserForm1.TextBox12.Value = Sheet3.Range("I26")
UserForm1.TextBox13.Value = Sheet3.Range("C28")
If Sheet3.Range("G38") = "X" Then
UserForm1.OptionButton1 = True
ElseIf Sheet3.Range("G39") = "X" Then
UserForm1.OptionButton2 = True
End If
End Sub
I´m thinking maybe there should be an ApplicationEvent or something in the beginning of the code?
Thanks in advance
Bookmarks