+ Reply to Thread
Results 1 to 4 of 4

Copy selection from Excel into Putty (need to use SendKeys to simulate <F4>)

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Copy selection from Excel into Putty (need to use SendKeys to simulate <F4>)

    I have a selection of cells in a row (A1:A14) that needs to be copied and pasted into PuTTY. After the selection is entered i need to hit <F4>, which will end the process and allow me to go back into the excel sheet, copy the next selectionSample for Excel Forum.xlsx (B1:B14) and continue on in this fashion.

    Currently, i copy the cell range in Excel, right click in PuTTY (which pastes the selection) but I have to hit the <F4> key on the keyboard and go back into the Excel to grab the next selection and repeat the process.

    I would like to be able to loop through and create macro/code that process for me back and forth between programs.

    **Some of our Function keys have alternate shortcut keys (like to Add the Selection you can <F1> or hit the "a" key) but there is no default shortcut/alternate for the End process (aka <F4>). I've tried to create one button but it had disastrous results.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy selection from Excel into Putty (need to use SendKeys to simulate <F4>)

    Hello WNErika,

    Currently, you are doing everything using cut and paste between the two programs?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-04-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: Copy selection from Excel into Putty (need to use SendKeys to simulate <F4>)

    Yes! I copy in Excel - then go over to my PuTTY session - right click the mouse to paste the data - got to my keyboard and hit F4 and/or ENTER (depending on what the rules are for the PuTTY screen I am in) and back to Excel

    Quote Originally Posted by Leith Ross View Post
    Hello WNErika,

    Currently, you are doing everything using cut and paste between the two programs?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy selection from Excel into Putty (need to use SendKeys to simulate <F4>)

    Hello WNErika,

    SendKeys is not reliable for sending keystrokes to other programs. This can be done using the Windows API. This requires correctly identifying the window's "handle" and which child window receives the input.

    Unfortunately, I can not write the code because my system does not have Secure Shell or PuTTY.

+ 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. Trying to open Putty from Excel which contains list of servers.
    By prabsriv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2017, 09:55 AM
  2. Sendkeys to simulate left-click
    By rishadjb in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-02-2016, 08:14 AM
  3. To connect to putty through excel macro
    By Aswathy_Sanesh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2015, 02:09 AM
  4. help needed on Putty automation using Excel VB application
    By mohanece in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2014, 04:27 AM
  5. Can someone help how to load putty with excel
    By Ariff57 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2012, 05:12 AM
  6. How to simulate Control (key) and Mouse (click) Selection
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2008, 06:11 PM
  7. How to simulate Control (button) and Mouse Selection of
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2008, 10:05 AM

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