ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Capture range object address (https://www.excelbanter.com/excel-programming/360173-capture-range-object-address.html)

doco[_2_]

Capture range object address
 
I am using Set oMyRange = Application.InputBox(Prompt, Title, Type:=8) to
capure user range input. I see in the refedit box on the inputbox that
"Sheet1!$E$24" shows up but the worksheet name is dropped when capturing the
address, IE, $E$24 is what is returned. I want the worksheet to be returned
as well.

How may this be done?

TIA

doco



doco[_2_]

Capture range object address
 
Never mind - what a bone head!!

This works...

Set oMyRange = Application.InputBox(Prompt, Title, Type:=8)

MsgBox = oMyRange.Address(True, True, ,True) ' Returns
[Book]Sheet!Address



"doco" wrote in message
...
I am using Set oMyRange = Application.InputBox(Prompt, Title, Type:=8) to
capure user range input. I see in the refedit box on the inputbox that
"Sheet1!$E$24" shows up but the worksheet name is dropped when capturing
the address, IE, $E$24 is what is returned. I want the worksheet to be
returned as well.

How may this be done?

TIA

doco






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com