LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Excel VBA setting Ranges

Further to Ron's`suggestion, perhaps...

Dim MyRange As Range
Set MyRange = Selection
With MyRange
.Cells(1) = 123: .Cells(,Cells.Count) = 456
End With 'MyRange

-OR- simply...

With Selection
.Cells(1) = 123: .Cells(,Cells.Count) = 456
End With 'Selection

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


 
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 Scope of name ranges to particular worksheet AZSteve Excel Discussion (Misc queries) 2 May 1st 10 01:13 PM
dynamic setting of data ranges Patrick Charts and Charting in Excel 1 January 7th 08 08:51 AM
help with setting up dynamic name ranges Jeff Excel Worksheet Functions 5 September 22nd 06 02:07 PM
Setting ranges Scottie[_2_] Excel Programming 3 February 26th 04 06:22 PM
Setting PrintArea by using Named Ranges Oren Klaber Excel Programming 2 January 30th 04 10:34 PM


All times are GMT +1. The time now is 01:18 PM.

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"