+ Reply to Thread
Results 1 to 8 of 8

range of cells & SendKeys

  1. #1
    Registered User
    Join Date
    02-16-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    70

    range of cells & SendKeys

    Hi guys


    You can see the range is A1:A100, I always change this range in below VBA code manually as per need.

    I'm using this formula -----"A1:A"&COUNTA(A:A)---in cell H2 to show the range.

    I do not know how to change this VBA code to mention the range is in H2 cell rather than using [A1:A100]

    could you please help.

    Thanks

    HTML Code: 

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: range of cells & SendKeys

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: range of cells & SendKeys

    Try to avoid SendKeys() if at all possible.

    What is the purpose, to set formula values as static values? If so:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-16-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: range of cells & SendKeys

    Quote Originally Posted by bakerman2 View Post
    Please Login or Register  to view this content.
    Thank you very much , it is working perfectly
    but
    is it possible to use H2 cell as range in this code ?

  5. #5
    Registered User
    Join Date
    02-16-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: range of cells & SendKeys

    Quote Originally Posted by Kenneth Hobson View Post
    Try to avoid SendKeys() if at all possible.

    What is the purpose, to set formula values as static values? If so:
    Please Login or Register  to view this content.
    Thanks
    Sorry, I did not mention, I'm sending keys from excel to other software so I think , I may have to use send keys .

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: range of cells & SendKeys

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-16-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: range of cells & SendKeys

    Thanks

    After sending keys (a1:a100) to other software ... Which key code can be used to go to first cell in the destination software where the first entry has been send from excel.
    The destination software has no cell reference.

    For example

    The values of A1 cell in excel is 123
    I send 100 key strokes to other software ,this software receives data from excel in column cell be cell.
    I want when the other software receives last key stroke from excel from cell A100 then by any KEY CODE it should only go to the first cell where the value 123 lies . By up arrow or page up or scroll up

    Cheers
    Thanks

  8. #8
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: range of cells & SendKeys

    That is beyond the scope of what we can tell you. Do it manually and write down your key combinations.

+ 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. Replies: 6
    Last Post: 09-16-2016, 03:52 PM
  2. [SOLVED] SendKeys - Copying a Range
    By Rob.Marchel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2014, 07:50 PM
  3. [SOLVED] Sendkeys for Alt+8
    By plasma33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2012, 06:09 PM
  4. SendKeys
    By PedroPietro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2011, 12:11 PM
  5. [SOLVED] SendKeys Help
    By ajvasel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2006, 11:54 AM
  6. [SOLVED] SendKeys in VBA
    By John in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2005, 01:05 PM
  7. [SOLVED] SendKeys?
    By CMK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2005, 08:06 PM

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