Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
Hi all, i need to pass a string (e.g. "D10:D150") that defines a range as argument to a function. My problem: I have this range defined as range object: Code: -------------------- Set destrange = activeSheet.Range(Cells(myDestinationStartRow, myDestinationCol), Cells(myDestinationEndRow, myDestinationCol)) -------------------- How can i convert this range to a string defined above? is this possible? regards, thomas -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
Dim rngstr as string
rngStr=destrange.address() "usadream" wrote: Hi all, i need to pass a string (e.g. "D10:D150") that defines a range as argument to a function. My problem: I have this range defined as range object: Code: -------------------- Set destrange = activeSheet.Range(Cells(myDestinationStartRow, myDestinationCol), Cells(myDestinationEndRow, myDestinationCol)) -------------------- How can i convert this range to a string defined above? is this possible? regards, thomas -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
Hi,
destrange is a range object destrange.address = the property will return a string that is the address It just depends on how you define your function argument ie function(rng as string or rng as range) Regards Jean-Yves "usadream" wrote in message ... Hi all, i need to pass a string (e.g. "D10:D150") that defines a range as argument to a function. My problem: I have this range defined as range object: Code: -------------------- Set destrange = activeSheet.Range(Cells(myDestinationStartRow, myDestinationCol), Cells(myDestinationEndRow, myDestinationCol)) -------------------- How can i convert this range to a string defined above? is this possible? regards, thomas -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
thanx a lot for your replies! totally works! now what i need is to get rid of the $ signs that show up in the string.. any easy way to do this? regards thomas -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
Is this really a problem ?
What do you do next with your function on that range ? JY "usadream" wrote in message ... thanx a lot for your replies! totally works! now what i need is to get rid of the $ signs that show up in the string.. any easy way to do this? regards thomas -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to string
sorry found it, thanx :-) -- usadream ------------------------------------------------------------------------ usadream's Profile: http://www.excelforum.com/member.php...o&userid=32703 View this thread: http://www.excelforum.com/showthread...hreadid=530028 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range | Excel Programming | |||
Retrieving range string from named range | Excel Programming | |||
Translate range name passed as string to a custom function to range addresses! | Excel Programming | |||
Passing a String in Array to Range as String | Excel Programming | |||
String to Range? | Excel Programming |