DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Selecting Columns in Excel

  1. #1
    Steve Guest

    Selecting Columns in Excel


    Hello all,
    I am trying to figure out a way to set a range object to a group of columns.
    What I want is the equivalent of:

    set rng = sht.Columns("B:H")

    but I want to use numeric values for the columns. Does anyone know the syntax
    for this?

    Thanks,
    Steve.

  2. #2
    Rob Bruce Guest

    Re: Selecting Columns in Excel

    > What I want is the equivalent of:
    >
    > set rng = sht.Columns("B:H")
    >
    > but I want to use numeric values for the columns.


    Set rng = sht.Range(Cells(2), Cells(8)).EntireColumn

    HTH

    --
    Rob

    www.rb-ad.dircon.co.uk/rob/excelvba/



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center