Closed Thread
Results 1 to 9 of 9

application.sendkeys shift+ctrl+enter

  1. #1

    application.sendkeys shift+ctrl+enter

    hi all,
    does anyone know hoe to translate it for use for the function sendkey
    in excel?


  2. #2
    Chip Pearson
    Guest

    Re: application.sendkeys shift+ctrl+enter

    I would avoid SendKeys at all costs. If you need to array-enter a
    formula from VBA, use the FormulaArray property. E.g.,

    Range("A1").FormulaArray = "=SUM(B1:B10)"


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    <[email protected]> wrote in message
    news:[email protected]...
    > hi all,
    > does anyone know hoe to translate it for use for the function
    > sendkey
    > in excel?
    >




  3. #3

    Re: application.sendkeys shift+ctrl+enter

    yes,i know but my problem is that the formulaarray doesnt accept more
    the 255 characters and my formulaarray is passing thats why,im first
    using usual formula and then call sendkey,this is how i can bypass this
    problematic issue
    Chip Pearson wrote:
    > I would avoid SendKeys at all costs. If you need to array-enter a
    > formula from VBA, use the FormulaArray property. E.g.,
    >
    > Range("A1").FormulaArray = "=SUM(B1:B10)"
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    > <[email protected]> wrote in message
    > news:[email protected]...
    > > hi all,
    > > does anyone know hoe to translate it for use for the function
    > > sendkey
    > > in excel?
    > >



  4. #4
    NickHK
    Guest

    Re: application.sendkeys shift+ctrl+enter

    Here's a solution:
    http://www.dailydoseofexcel.com/arch...rmulas-in-vba/

    NickHK

    <[email protected]> wrote in message
    news:[email protected]...
    > yes,i know but my problem is that the formulaarray doesnt accept more
    > the 255 characters and my formulaarray is passing thats why,im first
    > using usual formula and then call sendkey,this is how i can bypass this
    > problematic issue
    > Chip Pearson wrote:
    > > I would avoid SendKeys at all costs. If you need to array-enter a
    > > formula from VBA, use the FormulaArray property. E.g.,
    > >
    > > Range("A1").FormulaArray = "=SUM(B1:B10)"
    > >
    > >
    > > --
    > > Cordially,
    > > Chip Pearson
    > > Microsoft MVP - Excel
    > > Pearson Software Consulting, LLC
    > > www.cpearson.com
    > >
    > >
    > >
    > > <[email protected]> wrote in message
    > > news:[email protected]...
    > > > hi all,
    > > > does anyone know hoe to translate it for use for the function
    > > > sendkey
    > > > in excel?
    > > >

    >




  5. #5
    Registered User
    Join Date
    12-02-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    74

    Re: application.sendkeys shift+ctrl+enter

    Guys, I have used below function and it works perfect, however it takes a while to take effect(because of for loop)
    <code lang="vb">
    Function CreateArrayFunction(ByVal sRange As String, formula As String) As Boolean
    For Each oCell In Worksheets("sheetName").Range(sRange)
    oCell.FormulaArray = formula
    Next oCell
    End Function
    </code>

    does anyone knows alternative to this?

    Thanks
    -N

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: application.sendkeys shift+ctrl+enter

    Why you need a function for this??

    You can assign it directly in your Macro code itself

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  7. #7
    Registered User
    Join Date
    12-02-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    74

    Re: application.sendkeys shift+ctrl+enter

    I tried 'FormulaArray' with 'Range' but this has 255 character limitation. This limitation is applicable to my function as well
    Any clue on this?

    I have tried solution given on http://dailydoseofexcel.com/archives...comment-694082
    but this does not work for me.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: application.sendkeys shift+ctrl+enter

    Hm... I mis-interpreted the question and apologies for that.

    Sorry I don't have any suggestion for this

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: application.sendkeys shift+ctrl+enter

    linok

    This is a 8 years old thread!! So pls take a look to forum rules, because:

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

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