Enter Vs Return

  • Re: Enter Vs Return


    See SendKeys Statement and SendKeys Method


    Code
    Application.SendKeys ("~")


    Quote

    but every one of them is just going onto a new line!

    That's what the Enter key does! You cannot run a macro while in Edit mode so you cannot use it to enter a value while in edit mode.

  • Re: Enter Vs Return


    I was a bit vague on my problem, apologies


    Im using VBA to launch my mainframe application, enter data and submit it. Whilst working in the mainfrome, RETURN gives a new line, and ENTER (next to numberpad) submits. Ive tried "~" aswell as all the others I mentioned, but as opposed to submitting the data its just putting the cursor to a new line (effectively pressing RETURN in mainframe)


    hope this is more clear
    thanks

  • Re: Enter Vs Return


    If your emulator is like mine, you can submit to the mainframe by the Right Control key as-well-as the numeric Enter key. The code below uses and API routine to simulate pressing and releasing the Right Control key.


    Of course some emulators come with macro tools to create macro text files. One can record a macro to do some of these kinds of things. Once you know the syntax, you can write these as Text files in VBA if needed.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!