One for you Luke, from old forum that I could find on here.
This worked a treat.
How's this look?
response
Also, there are a few empty rows and heading that i need to skip.
Can this line be updated to have multiple ranges?
For Each c In Range("C9:C44")
e.g.
For Each c In Range("C9:C20","C22:C24") or similar?
Cheers
This worked a treat.
How's this look?
Code:
Sub PrintBooks()
Dim c As Range
Dim myPath As String
Dim newBook As Workbook
Application.ScreenUpdating = False
For Each c In Range("A1:A23")
myPath = c.Formula
'Remove first bracket, = sign, and any single quotes
myPath = Mid(WorksheetFunction.Substitute( _
WorksheetFunction.Substitute(myPath, "[", ""), "'", ""), 2)
myPath = Left(myPath, WorksheetFunction.Find("]", myPath) - 1)
Set newBook = Workbooks.Open(myPath, False, True)
newBook.Worksheets("Prices").PrintOut
newBook.Worksheets("Forecast").PrintOut
newBook.Close False
Workbooks.Open (myPath)
Next c
Application.ScreenUpdating = True
End Sub
Also, there are a few empty rows and heading that i need to skip.
Can this line be updated to have multiple ranges?
For Each c In Range("C9:C44")
e.g.
For Each c In Range("C9:C20","C22:C24") or similar?
Cheers