Hey everyone!
I am still pretty green with VBA, but I know enough to get stuff done. But, I've found myself in a bit of a rut with a spreadsheet that I'm working on. Long-story-short, I am trying to write a private sub in a specific worksheet that will call a certain UserForm when the lowest cell in an empty range (containing one column and dozens of rows) is changed to a specific value. I will then fill in data to this UserForm and have it fill across specific cells in the same row, but that part should be easy enough. I just can't quite seem to get the code right to call the UserForm. The code below is about as close as I can get, but it isn't quite right.
Any help is appreciated! Thanks!
-------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A10:A409")) Is Nothing Then
If (Worksheets("Play-by-Play - Redux").Range("A11:A409").Cells(emptyRow, 5).Value) = "HR" Then
Call Home_Run_UserForm.Show
'Activate Home_Run_UserForm
End If
End If
End Sub
-------------
I am still pretty green with VBA, but I know enough to get stuff done. But, I've found myself in a bit of a rut with a spreadsheet that I'm working on. Long-story-short, I am trying to write a private sub in a specific worksheet that will call a certain UserForm when the lowest cell in an empty range (containing one column and dozens of rows) is changed to a specific value. I will then fill in data to this UserForm and have it fill across specific cells in the same row, but that part should be easy enough. I just can't quite seem to get the code right to call the UserForm. The code below is about as close as I can get, but it isn't quite right.
Any help is appreciated! Thanks!
-------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A10:A409")) Is Nothing Then
If (Worksheets("Play-by-Play - Redux").Range("A11:A409").Cells(emptyRow, 5).Value) = "HR" Then
Call Home_Run_UserForm.Show
'Activate Home_Run_UserForm
End If
End If
End Sub
-------------