Hello everyone.
I built few months ago this macro
Sub aggiornacella()
a = Sheets("Lista").Range("F3").Value
b = Sheets("Lista").Range("F4").Value
c = ""
For i = a To b
ThisWorkbook.Sheets("Lista").Cells(3, 3).Value = i
Application.CalculateFull
c = Sheets("Lista").Range("C4").Value
ThisWorkbook.Sheets("A3 ONE PAGER").Copy
ChDir "C:\Users\cge01522\Desktop\small56down"
'ActiveWorkbook.SaveAs Filename:=c, FileFormat:=51
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
i & c _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
ActiveWorkbook.SaveAs Filename:=i & c, FileFormat:=51
ActiveWorkbook.Close
Next
End Sub
If I try to run the macro an alert reports this error:
File not found:
'C:\Users\cg08644\AppData\local\temp\VB7DB1.tmp
Then MVB says:
Run Time error 1004
Copy method of Worksheet class failed:
If I debug the code underlined in yellow is:
ThisWorkbook.Sheets("A3 ONE PAGER").Copy
Why and what I should change?
Thank you so much in advance
Rocco
I built few months ago this macro
Sub aggiornacella()
a = Sheets("Lista").Range("F3").Value
b = Sheets("Lista").Range("F4").Value
c = ""
For i = a To b
ThisWorkbook.Sheets("Lista").Cells(3, 3).Value = i
Application.CalculateFull
c = Sheets("Lista").Range("C4").Value
ThisWorkbook.Sheets("A3 ONE PAGER").Copy
ChDir "C:\Users\cge01522\Desktop\small56down"
'ActiveWorkbook.SaveAs Filename:=c, FileFormat:=51
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
i & c _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
ActiveWorkbook.SaveAs Filename:=i & c, FileFormat:=51
ActiveWorkbook.Close
Next
End Sub
If I try to run the macro an alert reports this error:
File not found:
'C:\Users\cg08644\AppData\local\temp\VB7DB1.tmp
Then MVB says:
Run Time error 1004
Copy method of Worksheet class failed:
If I debug the code underlined in yellow is:
ThisWorkbook.Sheets("A3 ONE PAGER").Copy
Why and what I should change?
Thank you so much in advance
Rocco