VBA: Call UserForm if the Lowest Empty Cell in a Range is Filled w/ a Specific Value

TheMAP

New Member
Joined
May 16, 2017
Messages
6
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
-------------
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top