Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Defining a range

Matt,

Try something like

Dim Rng As Range
Set Rng = Range("D10:D15,F10:F15,H10:H15")
Rng.ClearContents


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Matt" wrote in message
...
Is it possible to define a particular range of cells so that

you can just refer to the range name in the code? This is what I
tried, however it didn't work. Also, if I can do this, when I
use it in the code would I just put " selectrng.value = "" "if I
want it to clear out all of the values in the range? Thanks. I
tried it with parentheses and without and it still wouldn't work.


Dim selectrng as Range "D10:D15,F10:F15,H10:H15"



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
Defining Range Name anshu[_2_] Excel Discussion (Misc queries) 2 July 22nd 07 07:30 AM
Defining a range Don Excel Worksheet Functions 1 February 25th 05 03:54 PM
Defining Range Question? Michael168[_58_] Excel Programming 6 November 9th 03 02:52 PM
Defining Range Extent Nigel[_4_] Excel Programming 2 October 5th 03 12:10 PM
Defining Range MAB[_5_] Excel Programming 2 September 15th 03 02:48 PM


All times are GMT +1. The time now is 02:20 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"