+ Reply to Thread
Results 1 to 4 of 4

Code to disable and enable indentations

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Code to disable and enable indentations

    I am at a loss here, wrote macro to delete all indentation and then insert indent by one point, however, everytime i run the code it seems the indentation was never deleted the last time around so the code keeps adding the indentation which eventually results in the value not being visible in the cell anymore.
    Any ideas?
    Here's my code:
    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
    48,502

    Re: Code to disable and enable indentations

    Have you tried:

    Please Login or Register  to view this content.
    ... to clear the Indents and

    Please Login or Register  to view this content.
    ... to set it to 1


    That sort of implies you just need to set it to 1 rather than clearing it and setting it. That is, I suspect you just need to use the second one.


    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
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: Code to disable and enable indentations

    Thank you!
    Worked like a charm!

  4. #4
    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
    48,502

    Re: Code to disable and enable indentations

    You're welcome. Thanks for the rep.

+ 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. Create A Button In Document To Disable/Enable A Specific Line of Code
    By BLK306 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-05-2014, 02:12 PM
  2. Replies: 4
    Last Post: 06-06-2013, 10:21 AM
  3. Enable/disable copy paste (disable part not working)
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2012, 07:23 PM
  4. Enable and disable
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2010, 02:50 AM
  5. Enable / Disable CD-ROM thru VB
    By Lochdanon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2009, 10:43 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