AwesomeSteph
Board Regular
- Joined
- Aug 18, 2017
- Messages
- 80
I have it so that the userform only shows when "XYZ" is selected from a drop down in B2.
But now even after it is satisfied if I select any other drop down in any other cell of this worksheet the userform opens again. I only want it to open if "XYZ" is selected from B4.
Any help is greatly appreciated!
But now even after it is satisfied if I select any other drop down in any other cell of this worksheet the userform opens again. I only want it to open if "XYZ" is selected from B4.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If [B2].Text = "XYZ" Then
UserForm.Show
With UserForm
.StartUpPosition = 1
.Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
.Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
.Show
End With
End If
Application.ScreenUpdating = True
End Sub
Any help is greatly appreciated!