Results 1 to 4 of 4

Autofit columns in a range

Threaded View

  1. #1
    Registered User
    Join Date
    09-12-2010
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    41

    Autofit columns in a range

    I've done this simple code. But I want it to execute automatically?
    Sub autofit()
    
        Range("B4:B18").Columns.autofit
        Range("C4:C18").Columns.autofit
        Range("D4:D18").Columns.autofit
        Range("E4:E18").Columns.autofit
    
    End Sub
    It's in the VBA code of a specific sheet.

    Any suggestions (including improving existing code...I'm a new at this :-) )?

    Regards,
    Niklas
    Last edited by romperstomper; 08-22-2011 at 09:47 AM. Reason: code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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