+ Reply to Thread
Results 1 to 4 of 4

Macro Runtime error 1004 on IndentLevel

  1. #1
    Forum Contributor
    Join Date
    08-20-2013
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010, 2016, 2019
    Posts
    110

    Macro Runtime error 1004 on IndentLevel

    I have a Macro running to change the indent levels as per below and getting "Runtime error 1004 - Unable to set IndentLevel property of the Range class"
    Please Login or Register  to view this content.
    I know that I am getting the error because there is only data until B156, if I change the Macro to run from ("B10:B156"), I don't get the error.

    As other people will be working with the spreadsheet and might add additional data, I decided to give them some space to maneuver.

    How can I keep the current macro ("B10:B250") running, without the error?
    Attached Files Attached Files
    Last edited by davesexcel; 10-19-2020 at 12:46 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro Runtime error 1004 on IndentLevel

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Macro Runtime error 1004 on IndentLevel

    Do a len() count of the cell.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-20-2013
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010, 2016, 2019
    Posts
    110

    Re: Macro Runtime error 1004 on IndentLevel

    Thank you both mehmetcik and davesexcel! Really appreciate it!

+ 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. macro used to work but now runtime error 1004
    By clammastak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2016, 03:22 PM
  2. keep getting Runtime error 1004 in my VBA Macro and not sure why
    By Pimp_mentality in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2015, 04:29 PM
  3. Runtime Error 1004 on list creating macro
    By taipalam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2014, 04:13 AM
  4. [SOLVED] Runtime error 1004. the macro may not be available in this workbook or all macros may....
    By ddander54 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-29-2012, 08:46 AM
  5. Macro - Runtime Error 1004
    By Evian in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 10-08-2008, 04:54 AM
  6. [SOLVED] Excel 2003 Macro Error - Runtime error 1004
    By Cow in forum Excel General
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM
  7. naming tab macro error runtime error 1004
    By D in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2005, 10:06 PM

Tags for this Thread

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