Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm fairly new to writing macros (only used JAVA before not VB). Please help
I want to write a macro to print all worksheets (first page for each only) in a workbook with the exception of worksheets called "import" and "client details". I have made the following guess of how it should be written. Please advise where I've gone wrong. I don't know how to refer to the end of all worksheets in range or how to refer to a worksheet name (guessed with application.name) Many many thanks in anticipation James Sub Printing() ' ' Printing Macro For i = 1 To ??end of all worksheets?? Sheets(i).Select If (ActiveWindow.SelectedSheets.Application.Name = "import") Or (ActiveWindow.SelectedSheets.Application.Name = "client details") Then ' do nothing Else ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate:=True End If Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
There must be an easy way? | Excel Discussion (Misc queries) | |||
need to ammend a formula | Excel Worksheet Functions | |||
Add comments via a function - please could you ammend my code/ pseudocode to work | Excel Programming | |||
Easy Print macro needed | Excel Programming | |||
new user with easy question? not easy for me | New Users to Excel |