(Solved) – Cntrl + Page Up / Page Down not compatible with UserForm featuring refEdit

(solved)-–-cntrl-+-page-up-/-page-down-not-compatible-with-userform-featuring-refedit

I created an “Index Match Wizard” using UserForm controls. The code works effectively, however, I am unable to use cntrl pgup / pgdwn while the userform is running. No other shortcuts appear to be unavailable. The requirement to use a mouse to click to a different tab largely eliminates the purpose of the macro.

My code is as follows:

Sub UserForm_Initialize()

ListBox1.AddItem "Exact"
ListBox1.AddItem "Approx."

End Sub

Sub CommandButton1_Click()

MatchRangeOne = RefEdit1.Value
MatchRangeTwo = RefEdit2.Value
IndexRange = RefEdit3.Value

If ListBox1.Value = "Approx." Then

ActiveCell.Formula = "=INDEX(" & RefEdit3.Value & ",MATCH(" & RefEdit1.Value & "," & RefEdit2.Value & ",1))"

Else

ActiveCell.Formula = "=INDEX(" & RefEdit3.Value & ",MATCH(" & RefEdit1.Value & "," & RefEdit2.Value & ",0))"

End If

Unload IndexMatchWizardForm

End Sub'''

Leave a Reply

Your email address will not be published. Required fields are marked *