ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run-time error '1004': Select method of Sheets class failed (https://www.excelbanter.com/excel-programming/383118-re-run-time-error-1004-select-method-sheets-class-failed.html)

Sol[_4_]

Run-time error '1004': Select method of Sheets class failed
 
On 13 Feb, 14:37, "Don Guillett" wrote:
This should work and from anywhere withOUT any selections. Do you have a
typo in " Summary"?

sub printsheets()
myarray= Sheets(Array(" Summary", "Transaction Register", "Investrep", _
"Cashflow","Charts"))
for each sh in myarray
sh.PrintOut
next sh
End Sub

--
Don Guillett
SalesAid Software
"Sol" wrote in message

ps.com...



Hi all


I get the error - Run-time error '1004': Select method of Sheets class
failed
When I go to debug I get 1st and 2nd line highlighted in yellow


Sheets(Array(" Summary", "Transaction Register", "Investrep",
"Cashflow", _
"Charts")).Select
Sheets(" Summary").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("PRINTING").Select
Range("A1").Select
End Sub


Any ideas on how to remedy this please


Cheers


Sol- Hide quoted text -


- Show quoted text -


Sorry but this failed...got a compile error



All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com