From: JOSEPH WEBER on 11 May 2010 13:31 I need to know if there is a way i can run a macro to count all open workbooks and print "sheet1" of all open workbooks. The macro should close each workbook after printing the first sheet.
From: Per Jessen on 11 May 2010 14:05 Hi Here's a way Sub aaa() For Each wb In Application.Workbooks wb.Sheets("Sheet1").PrintOut wb.Close savechanges:=True 'Or false counter = counter + 1 Next msg = MsgBox(counter & " sheets has been printed", vbInformation + vbOKOnly) End Sub Regards, Per "JOSEPH WEBER" <JOSEPHWEBER(a)discussions.microsoft.com> skrev i meddelelsen news:579425C9-2EDF-437E-BB0B-2B59CA7CFDE5(a)microsoft.com... > I need to know if there is a way i can run a macro to count all open > workbooks and print "sheet1" of all open workbooks. The macro should close > each workbook after printing the first sheet.
|
Pages: 1 Prev: require cell input before macro can run Next: Unhide/hide based on drop down list |