+ Reply to Thread
Results 1 to 3 of 3

vba- reset a sheet after printpreview

Hybrid View

  1. #1
    Registered User
    Join Date
    06-24-2004
    Posts
    78

    vba- reset a sheet after printpreview

    I have a userform (user does not see workbook that runs behind it) with commandbutton1 that advance-filters data from a worksheets("report") and does a print preview. when i print or close the preview window, how can i reset the worksheet("report") so the user can run a different report with different filters.

    right now the form will not filter the second time because the first filter has empted the cells.

  2. #2
    Registered User
    Join Date
    06-24-2004
    Posts
    78

    resolved

    I think I resolved the problem by adding a line to the code

    worksheet("report").showalldata

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hi Greg,

    Try including the below line of code:

    Worksheets("report").ShowAllData

    Edit: Ooopps, you beat me to it by a minute!

    hth
    Rob
    Last edited by broro183; 11-03-2007 at 05:54 AM.
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

+ 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