+ Reply to Thread
Results 1 to 4 of 4

Autofit columns error

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Autofit columns error

    I have tried 2 options to autofit column width but receive the following error:
    Run-time error '1004':
    Application-defined or object-defined error

    Please Login or Register  to view this content.
    Thanks in advance

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,308

    Re: Autofit columns error

    Your code seems to works fine...Simplify to:
    Please Login or Register  to view this content.
    Edit...
    Is there any other code in the Sub.....
    Last edited by sintek; 12-05-2017 at 02:50 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Autofit columns error

    Thanks for your response - My code was OK but "Summary" sheet was protected - I unprotected, ran code & re-protected.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,308

    Re: Autofit columns error

    Coolio....

+ 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] Autofit error
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2017, 10:12 AM
  2. [SOLVED] VBA code to autofit columns
    By Amaresh Babu K S in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2017, 10:50 PM
  3. AutoFit columns with macro
    By deano3141 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2014, 08:58 AM
  4. [SOLVED] VBA Excel 2007 : Autofit Merge Cells Error "Run-time error '13': Type Mismatch"
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2012, 04:10 PM
  5. Autofit error
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-20-2011, 07:09 PM
  6. Autofit all columns
    By cultavix in forum Excel General
    Replies: 2
    Last Post: 11-25-2008, 07:26 AM
  7. Autofit some columns
    By Me in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2005, 05:06 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