Results 1 to 7 of 7

Simplifying VB code

Threaded View

odggi Simplifying VB code 09-29-2006, 08:00 AM
Bryan Hessey Count which there are most... 09-29-2006, 08:41 AM
JR@SGC Hi should look like the... 09-29-2006, 08:49 AM
odggi Hi JR, I've ended up with:... 09-29-2006, 10:04 AM
JR@SGC Ah sorry...... I ment it... 09-29-2006, 10:15 AM
Bryan Hessey Application.ScreenUpdating =... 09-30-2006, 07:09 AM
funkymonkUK you could add row and then... 09-29-2006, 08:47 AM
  1. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by odggi
    Hi JR,

    I've ended up with:

    Range("A:A,C:F,I:L,P:V,X:X,Z:Z,AB:AE,AG:AG,AJ:AK,AN:AN....").EntireColumn.Hidden = False
    Range("B:B,G:H,M:O,W:W,Y:Y,AA:AA,AF:AF,AH:AI,AL:AM...").EntireColumn.Hidden = True

    This has reduced about 40 lines of coding to just 2, BRILLIANT.
    You've been a great help, thanks, and thank you all for your contribution.

    Odggi
    Application.ScreenUpdating = False 
    Range("A:AZ").EntireColumn.Hidden = False
    Range("B:B,G:H,M:O,W:W,Y:Y,AA:AA,AF:AF,AH:AI,AL:AM...").EntireColumn.Hidden = True
    Application.ScreenUpdating = True
    would not disturb the natives so much and you would not need to amend the first setting when things change (except to set it to the most-right column).
    ---
    Last edited by Bryan Hessey; 09-30-2006 at 07:37 AM.

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