+ Reply to Thread
Results 1 to 5 of 5

Simple VBA to Activate and Deactivate Select Objects Tool

  1. #1
    Registered User
    Join Date
    10-02-2017
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    47

    Simple VBA to Activate and Deactivate Select Objects Tool

    I am looking for a VBA code to simply activate the Select Objects tool.

    I work with a lot of objects in my files and would like to just press Ctrl+m on the keyboard to activate this instead of going through the ribbon each time.
    Could someone please help me with this?
    I tried to just record a Macro for this but that does not work.

    Screeshot.jpg

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,274

    Re: Simple VBA to Activate and Deactivate Select Objects Tool

    You should just need something like:

    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,047

    Re: Simple VBA to Activate and Deactivate Select Objects Tool

    You could but a button for this on the Quick Access Toolbar, but otherwise

    In a standard module, place code to toggle the Select Objects
    Please Login or Register  to view this content.
    In the ThisWorkbook code assign Ctrl+M to the previous code when the workbook is activated and reset it when it's deactivated.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-02-2017
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    47

    Re: Simple VBA to Activate and Deactivate Select Objects Tool

    Quote Originally Posted by ByteMarks View Post
    You could but a button for this on the Quick Access Toolbar, but otherwise

    In a standard module, place code to toggle the Select Objects
    Please Login or Register  to view this content.
    In the ThisWorkbook code assign Ctrl+M to the previous code when the workbook is activated and reset it when it's deactivated.
    Please Login or Register  to view this content.
    Sorry, could I have a little more help with that please?
    I am not that familiar with VBA.

    I do want to be able to press Ctrl+m to activate it and then when I am done using it press Ctrl+m again to deactivate it.

    I do not know how to use the code you provided.
    I cannot just paste that into a Macro.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,047

    Re: Simple VBA to Activate and Deactivate Select Objects Tool

    Have a look here.
    https://www.educba.com/vba-editor/

    ThisWorkBook will be there already, but you'll need to insert the module (point #5) in the link.

+ 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. activate and deactivate shapes
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2019, 07:11 AM
  2. [SOLVED] "Select tool" for objects
    By emjbee in forum Excel General
    Replies: 3
    Last Post: 02-04-2014, 04:32 PM
  3. Activate or Deactivate a cell
    By aronyo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2011, 09:53 AM
  4. Workbook Activate/Deactivate strategy
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2011, 03:34 PM
  5. activate/deactivate macros
    By cinciman22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2009, 02:55 PM
  6. activate/deactivate hyperlinks
    By JChandler22 in forum Excel General
    Replies: 1
    Last Post: 08-04-2007, 07:41 AM
  7. [SOLVED] Activate/deactivate Office Clipboard in VBA
    By Peter Rooney in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2005, 10: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