I have a sub that does as intended WHEN I step through it (F8)
BIG but though; when RUN it in full, I simply don’t get the opportunity to make a selection from “ComboBox1” (surprise surprise!!)
I know I need a way to “Pause” the this sub while a selection is made in “ComboBox1” and then continue when it has been made, but I can’t figure out how to do it!!
I have looked at timed pauses but it is not the way I want to go.
The sub that will be called has an un-orthodox “End” statement that ends the above sub
ComboBox1 is an ActiveX
BIG but though; when RUN it in full, I simply don’t get the opportunity to make a selection from “ComboBox1” (surprise surprise!!)
I know I need a way to “Pause” the this sub while a selection is made in “ComboBox1” and then continue when it has been made, but I can’t figure out how to do it!!
I have looked at timed pauses but it is not the way I want to go.
VBA Code:
Option Explicit
Public Sub SelectFilterToRun ()
Dim sht As Worksheet
Dim rng As Range
Dim FrwD As Long
Set sht = ThisWorkbook.ActiveSheet
Application.ScreenUpdating = False 'This disables ScreenUpdating
Application.EnableEvents = False 'This disables Events
Set rng = Range("AK:AK").Find(what:="Paid to", LookIn:=xlValues, LookAt:=xlWhole)
If Not rng Is Nothing Then
FrwD = rng.Row
With ActiveSheet
.ComboBox1.Visible = True 'This Un-Hides "ActiveX ComboBox1" as is set to "Hidden" in its properties by default, this Sub "Unhides it"
End With
End If
MsgBox "Select from the DropDown which 'Get' Sub you want to run then"
[COLOR=rgb(226, 80, 65)][B]‘### This is where I need to create the pause[/B][/COLOR]
If Not Range("$BA$58") Is Nothing Then
Select Case Range("$BA$58")
Case "GetRePaid"
Call GetRePaid
Case "GetCommentCell"
Call GetCommentCell
End Select
MsgBox "You didn't Select from the DropDown which 'Get' Sub you want to run, go do it again"
Application.ScreenUpdating = True 'This re-enables ScreenUpdating
Application.EnableEvents = True 'This re-enables Events
If Range("$BA$58") = "" Then
With ActiveSheet
.ComboBox1.Visible = False 'Hides "ActiveX ComboBox1" for the next run of the Sub
End With
End If
End If
End Sub
ComboBox1 is an ActiveX