none
VBA, Ctrl End key, Userform RRS feed

  • Question

  • Hi,

    I use a UserForm "InvoerschermCelAdressen" and macro code as shown below.
    For input (Cel 1, Cel 2, Cel3) I use reference selection edits
    (RefEdit).
    My question is why I can't use the Ctrl End key combination  to refer to the end of the current worksheet while the Ctrl Home key
    combination works? Can anyone help me?

    Userform:

    Userform code:

    Private Sub CommandButton1_Click()
        If RefEdit1.Text = "" Or RefEdit2.Text = "" Or RefEdit3.Text = "" Then
           
    MsgBox "Eerst formulier invullen", vbExclamation, NaamDezeMacro
        ElseIf InStr(InvoerschermCelAdressen.RefEdit1, ":") Or _
               InStr(InvoerschermCelAdressen.RefEdit2, ":") Or _
               InStr(InvoerschermCelAdressen.RefEdit3, ":") Then
            MsgBox "U mag geen meerdere cellen opgeven.", vbExclamation, NaamDezeMacro
        Else
            InvoerschermCelAdressen.Hide
        End If
    End Sub






    • Edited by Thursday, October 15, 2015 5:32 PM
    Thursday, October 15, 2015 5:23 PM

Answers

All replies