Dec 10, 2002 #1 coolcarls Technical User Jan 19, 2002 182 US How do I have a sheet printout (via a macro) if a cell in another sheet has data? I have tried a bunch of stuff but can't get it right.
How do I have a sheet printout (via a macro) if a cell in another sheet has data? I have tried a bunch of stuff but can't get it right.
Dec 10, 2002 1 #2 tuxalot Technical User Sep 5, 2002 34 US Sub test() Application.ScreenUpdating = False Sheets("Sheet2".Activate Dim checker As Variant Set checker = range("A1" If checker <> "" Then Sheets("Sheet3".Select Application.Dialogs(xlDialogPrint).Show Application.ActivePrinter = "Set printer name here:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "Set printer name here:", Collate:=True End If Set checker = Nothing Application.ScreenUpdating = True End Sub Not the slickest, but it works. Sky Upvote 0 Downvote
Sub test() Application.ScreenUpdating = False Sheets("Sheet2".Activate Dim checker As Variant Set checker = range("A1" If checker <> "" Then Sheets("Sheet3".Select Application.Dialogs(xlDialogPrint).Show Application.ActivePrinter = "Set printer name here:" ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "Set printer name here:", Collate:=True End If Set checker = Nothing Application.ScreenUpdating = True End Sub Not the slickest, but it works. Sky
Dec 10, 2002 Thread starter #3 coolcarls Technical User Jan 19, 2002 182 US Thank You! Upvote 0 Downvote
Dec 10, 2002 #4 tuxalot Technical User Sep 5, 2002 34 US You're very welcome. I'm new to VBA, so it's nice giving a little back (even though I don't really know what I'm doing). Glad it worked out. Sky Upvote 0 Downvote
You're very welcome. I'm new to VBA, so it's nice giving a little back (even though I don't really know what I'm doing). Glad it worked out. Sky