+ Reply to Thread
Results 1 to 9 of 9

Save "Dynamic" sheet in workbook If cell = . To another location

  1. #1
    Registered User
    Join Date
    06-16-2007
    Posts
    10

    Save "Dynamic" sheet in workbook If cell = . To another location

    Hi all,
    The bellow code is for printing sheets in a work book if cell J8 = True.

    Please Login or Register  to view this content.
    But now I want to add onto it.

    So at the same time it prints, it also saves the sheets it's printing to a different file on the desktop .xls , where the name of the file = Consignment + cell "H11" on all sheets that return a true status in cell "J1"

    But saved without the code(unless it doesn't matter), just the info in the cells. This way the newly saved file won't point to a cell on a workbook that is constantly changed.

    eg. of file name it's saved as

    Consignment
    Cell "J1" = True
    Cell "H11" = ERO 0001

    IE. Consignment ERO0001

    Please Login or Register  to view this content.
    ^^ is just to give an idea of the name etc and location.

    If need be I can supply the workbook in question minus some data.

    Cheers for the help

    Damo
    Last edited by DJarqus; 07-19-2008 at 04:38 AM. Reason: Heading

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why are you repeating the Printout line 3 times? Something like this

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-16-2007
    Posts
    10

    Thumbs up Thanks

    Thanks M8,

    Yer that works a treat, but one problem is it also save the formulas from the original sheet. So if I happen to have them both open and change the data in the original one it'll also change the data in the newly created one.

    But yer, cheers for that. I'll keep poking along

    Oh and yer I had it 3 times to print 3 times. But your way is much better.



    DJ

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try this amended code

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-16-2007
    Posts
    10
    Hi royUK,

    Thanks for the quick replies.

    It comes up with Run time error '438'
    Object doesn't support this property or method
    I hit debug and . Selection.Copy is highlighted

    I don't know if it's cause i'm using excel 2000
    It's the same when I tried to do it , but a different way, same error.

    Cheers

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This should work

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-16-2007
    Posts
    10
    It comes up with same same error but at .Cells.Select


    Do ya think it's something on the sheet itself ?

    Thanks

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try this
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-16-2007
    Posts
    10
    Thanks M8, yep that works a treat

    cheers

+ 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