Hi All,
I've been asked to test excel docs as we are changing from office 2007 to 2016.
Running the following code, I receive a Compile Error - Can't Find Project or Library.
Is this a code error (previously worked fine on 2007) or an excel issue ? I am running this via remote desktop, could this cause an issue ?
Thanks for your help
I've been asked to test excel docs as we are changing from office 2007 to 2016.
Running the following code, I receive a Compile Error - Can't Find Project or Library.
Code:
Public Sub BatchPDF()
Dim n As Integer, i As Integer
Application.ScreenUpdating = False
If Sheets("BatchList").Visible = True Then Sheets("BatchList").Visible = False Else Sheets("BatchList").Visible = True
Sheets("BatchList").Select
' Find the last row of data
FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
' Loop through each row
For x = 2 To FinalRow
ThisValue = Cells(x, 2).Value
If ThisValue <> " " Then
Cells(x, 1).Copy
Sheets("Report").Select
Range("E7").Select
ActiveSheet.Paste
Sheets("BatchList").Select
End If
Sheets(Array("Report")).Select
Sheets("Report").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"D:\Supplier Level\Supplier Performance Report\" & Range("E6").Value, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
Sheets("BatchList").Select
Next x
Sheets("BatchList").Visible = False
Application.ScreenUpdating = True
End Sub
Is this a code error (previously worked fine on 2007) or an excel issue ? I am running this via remote desktop, could this cause an issue ?
Thanks for your help