+ Reply to Thread
Results 1 to 5 of 5

Copying from hidden/very hidden worksheet

  1. #1
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    200

    Copying from hidden/very hidden worksheet

    I have a current macro that selects data with certain criteria from a worksheet (test2) and it works great. But when I hide/very hide, it fails. Can someone please help me with what I need to do. Very hide is my preference. This is my current macro. Thank you!

    Sub test()

    Sheets("test2").Select


    Range("A1").Select
    Dim i As Range
    Dim num As Integer
    num = 1
    For Each i In Range("a1:a160")
    If i.Value > 0 Then
    i.Select
    ActiveCell.Rows("1:1").Range("b1:g1,i1:bf1").Select
    Selection.Copy

    Worksheets("test2").Select

    and so on.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,530

    Re: Copying from hidden/very hidden worksheet

    You can't select a hidden sheet or cells on it.

    Try something like:

    Please Login or Register  to view this content.

    Regards, TMS
    Last edited by TMS; 12-16-2013 at 09:41 AM. Reason: Added "Sheets("test2")." which I missed out. Noticed Jacc had included it.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Copying from hidden/very hidden worksheet

    Not sure what you are trying to do but this code will run on a very hidden sheet.
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Copying from hidden/very hidden worksheet

    Works like a champ! Thank you sooooo much!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,530

    Re: Copying from hidden/very hidden worksheet

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-13-2012, 11:10 AM
  2. Macros - Copying Worksheet as a CSV File - Worksheet Hidden
    By jsomer2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2011, 08:35 AM
  3. VBA Function Vlookup data from Hidden sheet in hidden workbook
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2008, 11:22 PM
  4. copying hidden cells and paste to non hidden cells on same sheet
    By 2newguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2007, 02:39 PM
  5. Replies: 3
    Last Post: 08-08-2006, 08:10 AM

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