+ Reply to Thread
Results 1 to 5 of 5

sendkeys “{TAB}” is being ignored

  1. #1
    Registered User
    Join Date
    06-13-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    4

    sendkeys “{TAB}” is being ignored

    i've created a .VBS file with the code seen below.

    It works fine if I use it to fill in any form in a browser, and also works with Excel and Notepad.

    However, it gives an error when used on an application installed on my system. The entire text is entered in a single cell. sendkey "{TAB}" doesn't work in this application.

    Also, if I press Tab after using this, it moves to the previous cell instead of the next cell. The Shift key gets stuck there because of CAPITAL text I think.

    Also, NUM LOCK key off sometimes while using this.

    Can any one help with this?

    set wshshell = wscript.CreateObject("wScript.Shell")
    wscript.sleep 700
    wshshell.sendkeys "TYPE TEXT 1"
    wscript.sleep 400
    wshshell.sendkeys "{TAB}"
    wscript.sleep 400
    wshshell.sendkeys "TYPE TEXT 2"
    wscript.sleep 400
    wshshell.sendkeys "{TAB}"
    wscript.sleep 400
    wshshell.sendkeys "TYPE TEXT 3"
    wscript.sleep 400
    wshshell.sendkeys "{TAB}"
    wscript.sleep 400
    wshshell.sendkeys "TYPE TEXT 4"
    wscript.sleep 400
    wshshell.sendkeys "{TAB}"
    wscript.sleep 400

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: sendkeys “{TAB}” is being ignored

    What is the application you are pasting to? Does the TAB key work manually to move between input fields?

    If your code works with Excel and browsers, then obviously the problem is related to your application, and we would need more information about it to provide a fix.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-13-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    4

    Re: sendkeys “{TAB}” is being ignored

    I am working on Citrix application. Yes tab key works in in where I am trying.

    No application doesn't have any issue other software like Auto Hot Key is working fine

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: sendkeys “{TAB}” is being ignored

    I think the problem is that your Excel macro is running in your Windows space and Citrix is a virtual desktop. I think this should work if you run your Excel macro from within Citrix. Does your Citrix desktop have Excel?

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: sendkeys “{TAB}” is being ignored

    I always need to put "DoEvents" before and/or after any SendKeys to allow the OS to wait a bit. If the correct program hasn't been selected (by the OS) the SendKeys gets lost between switching apps.

    https://msdn.microsoft.com/en-us/vba...vents-function
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SendKeys
    By pvj in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-04-2011, 08:30 AM
  2. SendKeys ??
    By lrhodes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2006, 03:41 PM
  3. [SOLVED] SendKeys Help
    By ajvasel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2006, 11:54 AM
  4. Always Sendkeys...
    By Angelo_R in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2006, 04:15 AM
  5. SendKeys
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2005, 01:05 PM
  6. [SOLVED] SendKeys in VBA
    By John in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2005, 01:05 PM
  7. Sendkeys
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2005, 02:06 PM
  8. [SOLVED] SendKeys?
    By CMK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2005, 08:06 PM

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