Log in

View Full Version : Set a worksheet to be the worksheet in which a relative range currently is loated in



Rejje
05-27-2011, 03:50 AM
Hi!

I am trying to set a worksheet to be the worksheet in which a relative range currently is loated in. This relative range can be located in any of many worksheets


Dim KPwb As Workbook
Dim RELws As Worksheet

Set KPwb = ActiveWorkbook
Set RELws = whatever worksheet Range("RelativeRange") is located in

' RelativeRange= a named area which address is dependant on a function and can be located in any of many worksheets


Ideas?

Bob Phillips
05-27-2011, 04:40 AM
Dim KPwb As Workbook
Dim RELws As Worksheet

Set KPwb = ActiveWorkbook
Application.Goto Range("RelativeRange")
Set RELws = ActiveSheet

mikerickson
05-27-2011, 06:46 AM
Perhaps
Set RELws = Range("RelativeRange").Parent