+ Reply to Thread
Results 1 to 4 of 4

Vb ranges - Newbie question

Hybrid View

  1. #1
    MarkI
    Guest

    Vb ranges - Newbie question

    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



  2. #2
    Bob Phillips
    Guest

    Re: Vb ranges - Newbie question

    maybe try

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


    --
    HTH

    Bob Phillips

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

    "MarkI" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >
    >




  3. #3
    MarkI
    Guest

    Re: Vb ranges - Newbie question


    "Bob Phillips" <[email protected]> wrote in message
    news:%[email protected]...
    > maybe try
    >
    > Set rnge = Worksheets("hidden_sheet_name").range("csv_update")
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "MarkI" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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
    >>
    >>

    >
    >


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

    Regards

    Mark



  4. #4
    Miguel Zapico
    Guest

    RE: Vb ranges - Newbie question

    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.

    "MarkI" wrote:

    > 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
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1