RccScln

New Member
Joined
Jul 27, 2016
Messages
27
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
 
Sorry guys if I am insisting but I did not manage to make it work.
I think since I am using my company PC that something changed at Folder Administrator level (I aksed the IT which till now couldn't fix the problem).
Can someone suggest an alterntive code?

I can send you the file if someone is available for help.

Tank you in advance
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,215,379
Messages
6,124,607
Members
449,174
Latest member
ExcelfromGermany

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top