+ Reply to Thread
Results 1 to 5 of 5

Simplfiy macro for disable selection pane with "with"

  1. #1
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Simplfiy macro for disable selection pane with "with"

    Hi,

    I have macro recording of disable selection pane.

    This is my code:

    Please Login or Register  to view this content.
    Would like to simplify macro with "with" but no successful.

    Any suggestion?

    Other method is welcome.

    Thanks

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Simplfiy macro for disable selection pane with "with"

    Hi, DavidRoger,

    like this
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Simplfiy macro for disable selection pane with "with"

    Hi DavidRoger,

    Even though your code is inefficient, I like it because it is very maintainable and easy to read.

    The following are 4 alternatives. The first is the code I would use for myself, even though it is inefficient.

    Please Login or Register  to view this content.
    Lewis

  4. #4
    Forum Contributor
    Join Date
    09-22-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Simplfiy macro for disable selection pane with "with"

    Hi Hahobe & Metzger,

    Your code works.

    I'll go with the short one since that is what I am looking for.

    I have trouble with the "with" because I didn't put space in front.

    Thanks guy.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Simplfiy macro for disable selection pane with "with"

    Hi, DavidRoger,

    I doubt the problem to be spaces (that´s just the look) but the dots instead. Thanks for the feedback.

    Ciao,
    Holger

+ 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] Disable "Right Click" ... or any ability to "cut", "insert", etc.
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2011, 09:26 AM
  2. Auto_open macro using an "expiration date" to disable the spreadsheet
    By thl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2008, 06:51 PM
  3. How to change a Command Button caption from "Enable" to "Disable"?
    By Infinity in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2007, 12:14 AM
  4. [SOLVED] can i get the "message pane" underneath the "threads pane" instea
    By Rich Mcc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-03-2006, 06:25 AM
  5. [SOLVED] Can I disable a macro in "Thisworkbook" with true or false?
    By Husker87 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-16-2006, 10:20 PM

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