+ Reply to Thread
Results 1 to 2 of 2

How do I enter a password after opening a program with SHELL

  1. #1
    Registered User
    Join Date
    07-23-2011
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2003
    Posts
    1

    How do I enter a password after opening a program with SHELL

    Hello,

    I have created a code to open up an external program by using the Shell command, and I now need to enter a password to gain access to the application.

    How can I:
    1. Select the password field
    2. Enter the required text
    3. Continue navigating the program's interface

    Thank you for your help.

  2. #2
    Registered User
    Join Date
    08-08-2011
    Location
    glasgow
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How do I enter a password after opening a program with SHELL

    Hello,
    The easiest way would probably be to use Sendkeys
    i.e.
    Shell ("C:\WINDOWS\system32\notepad.exe"), vbMaximizedFocus
    'opens external program and latches on
    Application.Wait (Now + TimeValue("0:00:03"))
    'Delays next action while application starts-up
    SendKeys "hello", True
    'Enters hello in whichever textbox, dropdown menu etc is active when external program is launched

    If program is launched and the specific texbox is not active you can use
    SendKeys "{ENTER}" or "{SHIFT}" etc to navigate around the application
    Here is a list of keys: http://orlando.mvps.org/SendKeysMore.asp
    Hope this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1