+ Reply to Thread
Results 1 to 7 of 7

Using shapes as buttons and including in tab order

  1. #1
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Using shapes as buttons and including in tab order

    I've created a data entry form on a worksheet. To confirm the entered details, and clear the existing data I've added a macro and applied that to a shape, to be used as a button, on the worksheet.

    The macro works when I click the shape/button so thats all fine.

    I'd like to have it so that the user presses the 'enter' or 'tab' keys to move between fields in the form. Once all fields have been filled, the 'tab' or 'enter' key should move to the shape, and then pressing 'enter' would run the macro to confirm the data and clear it.

    Is that possible?

    If not, is there anothe way to acheive what I'm looking for without using the excel stock buttons?

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Using shapes as buttons and including in tab order

    You could create a UserForm for the data entry rather than build one on the worksheet...
    Attach a copy of your file and I'll put something together for you.

    BSB

  3. #3
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73
    Quote Originally Posted by BadlySpelledBuoy View Post
    You could create a UserForm for the data entry rather than build one on the worksheet...
    Attach a copy of your file and I'll put something together for you.

    BSB
    I did think about a userform but there are only 2 fields for the user to fill in.

    I also like the greater amount of formatting available on a worksheet.

  4. #4
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Using shapes as buttons and including in tab order

    Here's a suggestion. Say your two input cells are A5 and B2 and your 'shape' is in C9...

    You will need to decide what to do after pressing the confirm button.


    Also, this site would not let me put an 'End Select' for some reason...so I have to put 'End S3lect' to get it past the firewall...

    Please Login or Register  to view this content.
    Last edited by Croweater; 07-03-2020 at 09:00 PM.

  5. #5
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Re: Using shapes as buttons and including in tab order

    That didnt quite work as I wanted Croweater.

    It did move between the input cells as intended, but when it selects the shape/button cell C9, I want it so that the user can then press enter and it will clear the exitsing data and select the first input cell again.

  6. #6
    Spammer
    Join Date
    10-23-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003, Office 365
    Posts
    1,237

    Re: Using shapes as buttons and including in tab order

    You said you had a macro that did all the right things for the button? So just put a couple of lines in there at the end to clear the two input cells and select the first input cell.

    Something like...
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-07-2004
    Location
    Manchester UK
    MS-Off Ver
    Office 2010
    Posts
    73

    Re: Using shapes as buttons and including in tab order

    Am I right in thinking then that the shape itself wont actually be 'selected' but instead the cell behind the shape would be?

+ 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] Using Shapes as Option Buttons
    By jwright2 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-05-2019, 10:55 AM
  2. Nested Code to remove shapes (buttons)
    By ragrone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2018, 06:01 AM
  3. Create shapes with formatting using macro buttons
    By daveb86 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-21-2017, 09:38 PM
  4. [SOLVED] VBA Solution to Copying Command Buttons and Shapes
    By DarkF1ame in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2016, 06:49 PM
  5. Sending a worksheet without including the sheet's macros and shapes
    By LeapingLizard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2012, 12:31 PM
  6. Can I Hide Shapes That Are Buttons???
    By JonesZoid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2012, 05:32 PM
  7. Formatting buttons & drawing shapes.
    By nomadscot in forum Excel General
    Replies: 4
    Last Post: 07-15-2006, 11:52 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