Results 1 to 4 of 4

Macro does not work when I move / copy sheet within the same workbook

Threaded View

  1. #1
    Registered User
    Join Date
    09-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    7

    Macro does not work when I move / copy sheet within the same workbook

    I am a new user of macros, but every month I have to create a new dashboard that I show "Open" for me to enter the information, and "Closed" so the managers see the totals only. I did not write the macro, I just recorded it.
    I recorded the following macro in my sheet "September", but when I use the "Move or Copy" to create the sheet and rename it October (this is within the same file), the macro does not work in the new sheet. This is a basic macro to hide and unhide rows and columns. (error 400)
    Please help;

    Sub ShowClosed()
    '
    ' ShowClosed Macro
    '
    
    '
        ActiveWindow.LargeScroll ToRight:=-1
        Columns("B:J").Select
        Selection.EntireColumn.Hidden = True
        Rows("4:10").Select
        Selection.EntireRow.Hidden = True
        Rows("12:19").Select
        Selection.EntireRow.Hidden = True
        Rows("21:28").Select
        Selection.EntireRow.Hidden = True
        Rows("30:37").Select
        Selection.EntireRow.Hidden = True
        Rows("39:46").Select
        Selection.EntireRow.Hidden = True
        Rows("48:48").Select
        Selection.EntireRow.Hidden = True
    End Sub
    Sub ShowOpen()
    '
    ' ShowOpen Macro
    '
    
    '
        Columns("A:O").Select
        Selection.EntireColumn.Hidden = False
        Rows("2:53").Select
        Selection.EntireRow.Hidden = False
        Range("F10").Select
    End Sub
    Last edited by alansidman; 09-20-2013 at 12:16 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 09-04-2012, 01:19 AM
  2. How to disable Move or Copy option in menu of one sheet only in workbook
    By nuttyengineer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 08:02 PM
  3. Macro to copy over and paste data in to a work sheet from a closed workbook
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2009, 04:04 AM
  4. Move/Copy macro doesn't work as aspected
    By Pero in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-25-2009, 03:17 PM
  5. [SOLVED] Find and Open Workbook then copy and move sheet
    By cwilson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2005, 05:54 PM

Tags for this Thread

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