Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

What is the  proper syntex for .cells or .range ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cgnotrom - 27 May 2008 03:11 GMT
Hi All
I am trying to read the array (m1:O1) in a Range command

using a for next loop where   'gm' is the incrementor
For gm =1 to 10

need to convert  .Range("M1:O1") to increment .Range(gm,13:gm,15)
or  .Cells(gm,13:gm,15)
neither seems to get past the debugger.
Thanks for any guidance !
Chris
Per Jessen - 27 May 2008 03:49 GMT
> Hi All
> I am trying to read the array (m1:O1) in a Range command
[quoted text clipped - 7 lines]
> Thanks for any guidance !
> Chris

Hi Chris

Here's a way to do it:

Dim TargetRange As Range
Set TargetRange = Range("M1:O10")

For Each c In TargetRange
   MsgBox c.Value
Next

Regards,
Per
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.