View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default Converting a range to string

One way:

str = rng.Parent.Name & "!" & rng.Address(True, True, False, False)


In article ,
"Robert Stober" wrote:

Hi,

I've got a range object that I want to convert to a string so I can use in
the PivotTableWizard method:

Dim rng As Range
set rng = Sheets("sales").Range("A1").CurrentRegion

I want to convert rng into a string like this:

"sales!R1C1:R796C6"

Any help you can provide will be greatly appreciated.

Robert Stober