Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB Script XL - Range Selection

I'm new to Scripting in Excel and trying to select a Range of cells beginning
at B13... want to End-down and then go right 23 cells and have that range
active to print... Closest I've come is
Range ("B13".End(xlDown)).Right 23.Activate {I've thrown in Right 23 as I
don't know how to include that part}... thanx in advance...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VB Script XL - Range Selection

Try

Range("B13").End(xlDown)(1, 24).Activate

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Tue, 2 Feb 2010 13:59:01 -0800, Servant63
wrote:

I'm new to Scripting in Excel and trying to select a Range of cells beginning
at B13... want to End-down and then go right 23 cells and have that range
active to print... Closest I've come is
Range ("B13".End(xlDown)).Right 23.Activate {I've thrown in Right 23 as I
don't know how to include that part}... thanx in advance...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VB Script XL - Range Selection

Close :) Split the command in two, first get the last row:
Lastrow = Range(Cells(13,ColNbr),Cells(13,ColNbr)).End(xlDow n).Row
Then go right:
Cells(Lastrow,ColNbr+23).Activate


"Servant63" wrote:

I'm new to Scripting in Excel and trying to select a Range of cells beginning
at B13... want to End-down and then go right 23 cells and have that range
active to print... Closest I've come is
Range ("B13".End(xlDown)).Right 23.Activate {I've thrown in Right 23 as I
don't know how to include that part}... thanx in advance...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change InputBox Range Selection to Column Letter Selection intoit Excel Programming 2 July 21st 09 07:58 AM
Range(Selection, Selection.End(xlToRight)).Select Dave Birley Excel Programming 2 June 6th 07 04:53 PM
VB Script based on combobox selection gmac[_2_] Excel Programming 1 March 30th 07 07:34 PM
Line selection from a cell script through a VBA macro CamiIRE Setting up and Configuration of Excel 2 April 11th 06 04:28 PM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM


All times are GMT +1. The time now is 09:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"