+ Reply to Thread
Results 1 to 5 of 5

SendKeys or Similar on Excel for Mac

  1. #1
    Registered User
    Join Date
    08-27-2013
    Location
    mexico df
    MS-Off Ver
    excel for mac 2011
    Posts
    16

    SendKeys or Similar on Excel for Mac

    I have Excel for Mac 2011
    I need to perform a series of key strokes but haven't figured out how to do it.
    For example, i need to press a + enter in a selection of cells.
    the code i have right now is

    Sub a_enter()
    Dim cell As Range
    For Each cell In Selection
    cell.Select
    SendKeys "a", True
    SendKeys "ENTER", True
    Next cell
    End Sub

    But it returns an error Run-time error '5': invalid procedure or argument...

    how can i do it?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: SendKeys or Similar on Excel for Mac

    Don't ever use SendKeys! Very difficult to control. Use, this ...

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-27-2013
    Location
    mexico df
    MS-Off Ver
    excel for mac 2011
    Posts
    16

    Re: SendKeys or Similar on Excel for Mac

    Thank you very much! I would still appreciate if you could please teach me the syntax of how i should use sendkeys in excel for mac. The approach you showed me does solve my problem for that particular issue.
    Best
    Alonso

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: SendKeys or Similar on Excel for Mac

    Thanks for the rep.


    I would still appreciate if you could please teach me the syntax of how i should use sendkeys in excel for mac.
    Sorry. 1) I do not know how you use Sendkeys on a Mac, 2) even if I did, I would not advocate using it, and 3) it is very unreliable ... you can easily send keystrokes to the wrong application.


    Regards, TMS

  5. #5
    Registered User
    Join Date
    08-27-2013
    Location
    mexico df
    MS-Off Ver
    excel for mac 2011
    Posts
    16

    Re: SendKeys or Similar on Excel for Mac

    ok, Thank you very much!

+ 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. Application.sendkeys - strange result! - Excel 2010
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2014, 07:36 AM
  2. SendKeys not working for displaying filter dropdown list in excel 2007
    By kwhhyk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2014, 09:12 AM
  3. [SOLVED] Sendkeys in Excel for Mac 2011
    By MikeJJones in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-02-2013, 09:15 AM
  4. Application.Sendkeys for Mac Excel
    By nalgene5622 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-02-2012, 09:42 PM
  5. How do I sendkeys to Interner Explorer from Excel?
    By els in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2005, 12:10 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