+ Reply to Thread
Results 1 to 7 of 7

OnKey on the Mac not working

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    OnKey on the Mac not working

    Hi there,

    I've ported a working macro from the PC - with a working Application.OnKey command to the mac (OSX10.7.5 and Excel 2011), but the OnKey is now ignored.

    Do you know if OnKey actually works on a mac and if so, any idea why mine may not be working?
    There's precious little about it on the net!

    Many thanks,
    Jon

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: OnKey on the Mac not working

    OnKey does work with Mac - which key are you trying to use?

  3. #3
    Registered User
    Join Date
    01-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: OnKey on the Mac not working

    Hi there Izandol, thanks for helping
    It's the "{Return}" or "{Enter}" key - neither work for me.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: OnKey on the Mac not working

    You may use "~" for the Return key.

  5. #5
    Registered User
    Join Date
    01-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: OnKey on the Mac not working

    Ok - update - yes the tilde does work (Thank you, Izandol) - but only in the cells. I had it working perfectly well in a text box on the sheet on the PC but it won't work in a text box on the mac. That appears to be the issue.
    Do you happen to know if any KeyPress or KeyDown events work on the Mac?

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: OnKey on the Mac not working

    No they do not - those are events for ActiveX controls and Macs do not allow those.

  7. #7
    Registered User
    Join Date
    01-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: OnKey on the Mac not working

    Ok thank you.

+ 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. Some Application.OnKey lines not working with Workbook_Open or Auto_Open
    By fonthiller in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2012, 11:55 AM
  2. ONKey
    By insanity66 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2010, 03:46 PM
  3. [SOLVED] OnKey
    By Hernan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2006, 12:20 PM
  4. Help with using OnKey
    By keithb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2005, 07:10 PM
  5. onkey method
    By freekrill in forum Excel General
    Replies: 1
    Last Post: 10-12-2005, 09: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