+ Reply to Thread
Results 1 to 6 of 6

Deslecting control buttons

  1. #1
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Deslecting control buttons

    I posted this once before, but unfortunately didn't get an answer, so I am reposting, but will try and re-word so my problem is clearer.

    I use control buttons to perform tasks.
    After the user clicks a button the cursor remains on the button.
    Therefore if the user start typing nothing happens on the spread sheet.
    The user has to use the mouse to click back on the spread sheet to start typing.
    If they forget and just start typing and hit the "enter" key, the button the cursor was resting on would be entered on - not the data they thought they had typed.

    Is there a way to finish the button macro so the cursor finishes back where it was before the button was clicked?


    Thank you.



    Please Login or Register  to view this content.

  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,496

    Re: Deslecting control buttons

    You could probably use a Worksheet Selection Change event handler to store the Target cell in a global range variable every time a cell was selected. Then you could select the stored cell at the end of your button click event handler.

    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
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,618

    Re: Deslecting control buttons

    You didn't post a workbook, so try:

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Re: Deslecting control buttons

    AppActivate Application.Caption works

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

    Re: Deslecting control buttons

    Also if it is Activex button you may set takefocusonclick property to False.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  6. #6
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Re: Deslecting control buttons

    Thank you.
    I'll try that too.

+ 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. [SOLVED] Hide control buttons using VBA
    By Steffen_DK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2012, 09:49 AM
  2. Excel 2007 : control buttons
    By hellsbells45 in forum Excel General
    Replies: 1
    Last Post: 03-14-2009, 01:03 AM
  3. Cut or Hid control buttons
    By pingwin77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2009, 02:10 AM
  4. Control Buttons
    By Truthseeker1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2008, 03:16 PM
  5. [SOLVED] How to control radio buttons on a web page?
    By festdaddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2006, 07:20 AM
  6. [SOLVED] Keeping Control Buttons Still
    By ZipCurs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-14-2005, 06:45 PM
  7. [SOLVED] Inverted Text in control buttons
    By willer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2005, 11:10 AM

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