PC Review


Reply
Thread Tools Rate Thread

Can I abbrevate the following (would I Dim and Set it as a Range?)

 
 
Simon
Guest
Posts: n/a
 
      18th Aug 2008
AccRep.Sheets("Volumes").Cells.Find("latest")

Rather than using this many times in the code I thought I could define
it as a Rng or Path or String or something?

Which would I use, whats the different between a Path and a String.

Thanks VBA (virtually beginner amateur)
 
Reply With Quote
 
 
 
 
stefan onken
Guest
Posts: n/a
 
      18th Aug 2008
hi, you can use Set to set a reference, e.g.

Dim rng as Range
Set rng = AccRep.Sheets("Volumes").Cells.find()
rng.offset(0,1)=1
rng.Offset(0,2)=2

rng must be a Range, a String won`t work.

stefan


On 18 Aug., 12:18, Simon <simonlaven...@gmail.com> wrote:
> AccRep.Sheets("Volumes").Cells.Find("latest")
>
> Rather than using this many times in the code I thought I could define
> it as a Rng or Path or String or something?
>
> Which would I use, whats the different between a Path and a String.
>
> Thanks VBA (virtually beginner amateur)


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enter formula sum(range+range)*0.15 sumif(range>=3) tkw Microsoft Excel Misc 2 1st Oct 2009 09:17 PM
subtracting a range from another range and getting a range result cartoper@gmail.com Microsoft Excel Discussion 4 3rd Feb 2007 05:47 PM
Excel Addin:Setting the range to the Excel.Range object range prop =?Utf-8?B?UnAwMDc=?= Microsoft Excel Worksheet Functions 5 24th Nov 2006 04:30 PM
Sum Range 1 when the elements in Range 2 are found in Range 3 james s shoenfelt Microsoft Excel Misc 1 3rd Nov 2003 11:34 PM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R Microsoft Excel Programming 2 11th Aug 2003 05:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 PM.