S
sverre
Hi, I have written below little procedure. I noticed that when I have a lot
of data to be recalculated the save-command starts before the calculate has
finished making my pdf-files incorrect. Is there any line I can add to solve
this?
By the way - automatic calc is turned off the the workbook.
Many thanks in advance,
Sverre
Sub PrintAllPortfoliosToFile()
'
' PrintAllPortfoliosToFile Macro
'
'Ändra namn på filen (och katalogen)
Dim portfolio As String
'
For Row = 2 To 21
portfolio = CStr(Cells(Row, 17))
Cells(2, 2) = portfolio
Calculate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Documents and
Settings\sverker\Desktop\Analys och uppföljning\PDF-rapporter\Uppföljning
20090228_" + portfolio + ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next Row
'
End Sub
of data to be recalculated the save-command starts before the calculate has
finished making my pdf-files incorrect. Is there any line I can add to solve
this?
By the way - automatic calc is turned off the the workbook.
Many thanks in advance,
Sverre
Sub PrintAllPortfoliosToFile()
'
' PrintAllPortfoliosToFile Macro
'
'Ändra namn på filen (och katalogen)
Dim portfolio As String
'
For Row = 2 To 21
portfolio = CStr(Cells(Row, 17))
Cells(2, 2) = portfolio
Calculate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Documents and
Settings\sverker\Desktop\Analys och uppföljning\PDF-rapporter\Uppföljning
20090228_" + portfolio + ".pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True,
IgnorePrintAreas:=False, OpenAfterPublish:=False
Next Row
'
End Sub