Vb ranges - Newbie question

  • Thread starter Thread starter MarkI
  • Start date Start date
M

MarkI

Hello all

I am defining a range in an application:

Set rnge = range("csv_update")

this works great as long as the code is executed from the worksheet that the
range is on. I would like to hide this sheet and execute the code on a sheet
(in the same workbook) called "Monitor".

How can I get a hold of the range on a hidden worksheet from a button on the
"Monitor" worksheet (or any other worksheet for that matter)?

Many thanks
 
maybe try

Set rnge = Worksheets("hidden_sheet_name").range("csv_update")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Bob Phillips said:
maybe try

Set rnge = Worksheets("hidden_sheet_name").range("csv_update")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

Thanks for the prompt reply. That was just the ticket :-)

Regards

Mark
 
You can refer the worksheet before the range. In this example, if the sheet
is called "Sheet1" it would be:
Set rnge = Activeworkbook.Worksheets("Sheet1").range("csv_update")

Hope this helps,
Miguel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top