Results 1 to 4 of 4

With for multiple ranges (not using Union)

Threaded View

beeawwb With for multiple ranges (not... 12-29-2008, 07:21 PM
VBA Noob I assume they are named... 12-29-2008, 07:31 PM
beeawwb Actually they're variables... 12-29-2008, 08:13 PM
beeawwb Actually I should have... 12-29-2008, 09:07 PM
  1. #1
    Forum Contributor beeawwb's Avatar
    Join Date
    01-04-2004
    Location
    Perth, WA, Australia
    MS-Off Ver
    Microsoft Office Excel 2003 (11.8146.8221) SP2
    Posts
    105

    With for multiple ranges (not using Union)

    Hi all,

    Quick question: When using "With" is it possible to specify 2 ranges, or will I need to do 2 different with blocks? The reason I say not using Union is because I need my ranges seperate. I run 1 set of commands on Range 1, and 1 set of commands on both Range 1 and 2.

    e.g. ...
                    With multirangew
                    .Locked = False
                    .ClearContents
                    End With
                    
                    With multirangew And qrangew
                    .Interior.ColorIndex = 2
                    .Interior.Pattern = xlSolid
                    .Interior.PatternColorIndex = xlAutomatic
                    End With
    Is this possible by other means, or will I have to do 1 "With" for multirangew and then a duplicate "With" for qrangew?

    Cheers,
    Bob
    Last edited by beeawwb; 12-30-2008 at 06:54 PM.

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