Lâm nghiệp

Tin học

giải trí

Hình ảnh

Code save as file excel thành pdf

Dưới đây là đoạn code thực hiện lệnh save as file excel thành pdf:

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Workbooks("taoPhubieu_KKR2014.xlsm").Sheets("home").Range("a31").Value & Workbooks("PHU LUC 7_tinh.xlsx").Sheets("code").Range("b2").Value

Ghi chú: 
+ Workbooks("taoPhubieu_KKR2014.xlsm").Sheets("home").Range("a31").Value là đường dẫn
+ Workbooks("PHU LUC 7_tinh.xlsx").Sheets("code").Range("b2").Value là tên file muốn lưu

No comments:

Post a Comment