Closed Thread
Results 1 to 2 of 2

Macro is not generating expected results.

  1. #1
    Registered User
    Join Date
    05-28-2009
    Location
    Oakville, ON Canada
    MS-Off Ver
    Excel 2002
    Posts
    75

    Macro is not generating expected results.

    I have created this macro (below) in a standalone spreadsheet and the expected results are that Columns A,B,C,D,G,H will be displayed after I run the macro. But when I use the same macro in my production worksheet (columns and ranges adjusted accordingly) this macro creates the following results: Column A is displayed and all the rest are hidden (B,C,D,E,F,G,H). I am stumped as to why this occurs. can you advice me? Thanks.

    Sub printestimate()
    '
    ' printestimate Macro
    ' Macro recorded 10/06/2009 by Pieter
    '

    '
    Columns("E:F").Select
    Selection.EntireColumn.Hidden = True
    Range("A1:I35").Select
    ActiveSheet.PageSetup.PrintArea = "$A$1:$H$111"
    End Sub

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro is not generating expected results.

    Please take a few minutes to read the forum rules, and then start a new thread with a descriptive title and your code in code tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

Closed 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