Results 1 to 8 of 8
  1. #1
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54

    Printing!!!!

    I am creating an excel document using access/vba, which contains tons of graphs (1 per tab), and I need to add a "print" button (or anything of the sort), that lets me print all the graphs at the same time.
    Right now I have to click on each one and print them separately, which makes me lose lots of time. Can anyone help me out? thanks

  2. #2
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54
    Does no one have any idea for this, it doesn't have to be perfect, don't be shy!

  3. #3
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Well, given that there are differences between Access VBA and Excel VBA, you'd probably be better off asking in an Excel Forum.

    That said, I'd try Googling "Print Entire Workbook Excel VBA" and see if that gives you what you want (or you could just click "File" -> "Print. . ." and change the "Print what" section from "Active Sheet(s)" to "Entire Workbook").

  4. #4
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54
    Thank you so much, I created a macro in Excel and then created a custom button in the toolbar! Never thought it would be that easy

  5. #5
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54
    Scratch that, it only works on my machine. It doesn't save the button made to the file, so when it's opened on a different machine, it's all gone!! crappers

    Does anyone know if this is even possible? I would have to create a macro button that contains the name of the printer required and other printer settings required, but I don't even know where to start as far as the coding for this... any insights/comments much appreciated

  6. #6
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54
    So I've found a ton of discussions on this subject, and found this code to work but I need to tweak it, maybe someone here can help me. If possible, can you make it so that the code selects a specific printer and prints in color? It will always be the same printer, but it defaults in B&W. Here is the code I have to work with:

    Code:
    Sub PrintEmbedded()
    
        Dim c As Object, w As Worksheet
        
        For Each w In ActiveWorkbook.Worksheets
            For Each c In w.ChartObjects
                c.Chart.PrintOut
            Next c
        Next w
        
    End Sub
    Thanks guys

  7. #7
    Kipster1203 is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    May 2010
    Posts
    54
    Here is what I have now

    Code:
    Sub PrintEmbedded()
    
        Dim c As Object, w As Worksheet
        
        Application.Dialogs(xlDialogPrint).Show
        
        For Each w In ActiveWorkbook.Worksheets
            For Each c In w.ChartObjects
                c.Chart.PageSetup.BlackAndWhite = True
                c.Chart.PrintOut
            Next c
        Next w
    The Application.Dialogs(xlDialogPrint).Show command makes the print window pop up so you can choose what printer you and so you can change settings (theoretically). It works as far as choosing the correct printer. But only the first chart prints out in color, the rest are in B&W. Any ideas?? Thanks...

  8. #8
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Well, as I said before, since this is an Excel issue and not an Access one, you'you would have been better off posting this in an Excel Forum than here.

    That said, just change c.Chart.PageSetup.BlackAndWhite to False and you'll be set.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report Printing
    By newtoAccess in forum Reports
    Replies: 5
    Last Post: 12-02-2009, 07:46 PM
  2. storing and printing on a pdf
    By jlm722 in forum Reports
    Replies: 4
    Last Post: 10-27-2009, 02:48 AM
  3. Printing problem
    By lornadobson in forum Reports
    Replies: 2
    Last Post: 09-29-2009, 05:28 AM
  4. Fields not printing
    By ecpike in forum Forms
    Replies: 10
    Last Post: 08-19-2009, 03:09 PM
  5. Help with my printing
    By mattwill2001 in forum Queries
    Replies: 4
    Last Post: 08-17-2009, 01:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums