Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Setting var to selected Range

El Bee

Dim MyRange As Range

Now at the point where you want to capture the range, do this statement:
Set MyRange = Range(Selection, ActiveCell.SpecialCells(xlLastCell))

Now range MyRange will be the cells indicated by your statement
--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com

-----------------------------------------------------------------------
"El Bee" wrote in message
...

I discovered the following statement
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select

now I want to set a var to the selected range.

Can anyone help; this VB stuff is all new to me and I really appreciate the
help I have received from many of the Guru's on this site!!!

Thanks again for your time and knowledge.

El Bee



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
setting print area to selected cells [email protected] Excel Discussion (Misc queries) 4 November 30th 06 09:29 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Setting TAB to navigate to selected Cells Only Corey Excel Worksheet Functions 3 May 29th 06 09:54 AM
VBA setting Range Jeff Excel Discussion (Misc queries) 1 December 2nd 05 07:36 PM
Setting up a form to input into selected worksheet Bob Excel Discussion (Misc queries) 0 June 29th 05 10:53 PM


All times are GMT +1. The time now is 02:17 AM.

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

About Us

"It's about Microsoft Excel"