+ Reply to Thread
Results 1 to 9 of 9

If sheet is visible then...

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    If sheet is visible then...

    Hi there,

    I hope someone will be able to help me please?

    My macro currently adds a lot of formulas and things to a huge sheet of data and works great. However things have changed since writing it and now there are about 30 sheets in the workbook, all in the same format that will need the same macro applied.

    So I have about 30 sheets which need this macro running across them all and 3 summary sheets which can be ignored. The line I was going down was to hide the summary sheets and do an 'if sheet is visible then do the code' and then making the summary sheets visible again. My problem with this is that it is only applying the code to one sheet and then stopping.

    My code to do this is:

    Please Login or Register  to view this content.
    I would appreciate any help anyone could give please?

    Thanks
    Last edited by Jessica.Bush; 05-30-2011 at 12:17 PM.

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: If sheet is visible then...

    could you post a sample workbook at which the problem occurs

  3. #3
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: If sheet is visible then...

    See the attached w.book and make the changes to suit your requirement.
    Attached Files Attached Files
    regards

    johnjohns

    When you are not sure where to go, every road takes you there!

  4. #4
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Re: If sheet is visible then...

    Hi,

    Please find attached an example - I obviously cut lots and have changed it to just two data sheets.

    Many thanks.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Re: If sheet is visible then...

    Thanks JohnJohns but I don't think this is what I am after...

  6. #6
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: If sheet is visible then...

    Try the second macro. I have also used your code
    Attached Files Attached Files

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: If sheet is visible then...

    or just use the name of the sheets
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  8. #8
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Re: If sheet is visible then...

    Many thanks both of you!

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: If sheet is visible then...

    Or use Excel's builtin facility 'Fillacrosssheets'

    Please Login or Register  to view this content.



+ 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