+ Reply to Thread
Results 1 to 3 of 3

Runtime error 1004 - unable to set Visible property of Worksheet c

Hybrid View

  1. #1
    SueJB
    Guest

    Runtime error 1004 - unable to set Visible property of Worksheet c

    I have a multi-sheet workbook that has been working fine until now. The only
    change I have made is adding another sheet which has a distinct name from the
    pre-existing ones.

    However, when I try to use the controls already included on other sheets, I
    get this runtime error (the sheet should hide itself on exit from that
    particular set of data). If I delete the newly added sheet I still have the
    problem in the code that worked fine on other sheets before.

    If I rem out the offending code (it's a 'with sheets(name) .visible =
    false end with') then it falls over at the next line.

    Anyone got any ideas?

    Thanks
    SJB

  2. #2
    Norman Jones
    Guest

    Re: Runtime error 1004 - unable to set Visible property of Worksheet c

    Hi Sue,

    At least one sheet needs to be visible and your error will occur if the code
    attempts to hide the last visible sheet.

    If this is not your problem, post the relevant control code

    ---
    Regards,
    Norman



    "SueJB" <SueJB@discussions.microsoft.com> wrote in message
    news:32C3FBE4-D4D3-4DD5-9AE1-F32923CF9973@microsoft.com...
    >I have a multi-sheet workbook that has been working fine until now. The
    >only
    > change I have made is adding another sheet which has a distinct name from
    > the
    > pre-existing ones.
    >
    > However, when I try to use the controls already included on other sheets,
    > I
    > get this runtime error (the sheet should hide itself on exit from that
    > particular set of data). If I delete the newly added sheet I still have
    > the
    > problem in the code that worked fine on other sheets before.
    >
    > If I rem out the offending code (it's a 'with sheets(name) .visible =
    > false end with') then it falls over at the next line.
    >
    > Anyone got any ideas?
    >
    > Thanks
    > SJB




  3. #3
    SueJB
    Guest

    Re: Runtime error 1004 - unable to set Visible property of Workshe

    Hi Norman

    That's it - many thanks. I am obviously having a very stupid day :-(

    Best wishes
    Sue

    "Norman Jones" wrote:

    > Hi Sue,
    >
    > At least one sheet needs to be visible and your error will occur if the code
    > attempts to hide the last visible sheet.
    >
    > If this is not your problem, post the relevant control code
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "SueJB" <SueJB@discussions.microsoft.com> wrote in message
    > news:32C3FBE4-D4D3-4DD5-9AE1-F32923CF9973@microsoft.com...
    > >I have a multi-sheet workbook that has been working fine until now. The
    > >only
    > > change I have made is adding another sheet which has a distinct name from
    > > the
    > > pre-existing ones.
    > >
    > > However, when I try to use the controls already included on other sheets,
    > > I
    > > get this runtime error (the sheet should hide itself on exit from that
    > > particular set of data). If I delete the newly added sheet I still have
    > > the
    > > problem in the code that worked fine on other sheets before.
    > >
    > > If I rem out the offending code (it's a 'with sheets(name) .visible =
    > > false end with') then it falls over at the next line.
    > >
    > > Anyone got any ideas?
    > >
    > > Thanks
    > > SJB

    >
    >
    >


+ 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