I have a spreadsheet with interacting userforms and I have hit a snag when calling on a second userform while a previous is still active. There are times I want the value of a combobox in the first to be transferred to the second so I used this code for userform2.
Private Sub UserForm_Activate()
UserForm2.ComboBox1.SetFocus
If UserForm1.Visible = True Then
UserForm2.ComboBox1.Value = UserForm1.ComboBox2.Value
Else: Exit Sub
End If
End Sub
This seems to work with one large exception. When userform1 is not active, the “if” statement triggers the userform1 to activate, which is not what I want at all. Should I be using something other then a visible argument?
Ideas would be appreciated
Thanks
VanMN
Private Sub UserForm_Activate()
UserForm2.ComboBox1.SetFocus
If UserForm1.Visible = True Then
UserForm2.ComboBox1.Value = UserForm1.ComboBox2.Value
Else: Exit Sub
End If
End Sub
This seems to work with one large exception. When userform1 is not active, the “if” statement triggers the userform1 to activate, which is not what I want at all. Should I be using something other then a visible argument?
Ideas would be appreciated
Thanks
VanMN