標題:
[發問]
只選兩個工作表的值與格式另存新檔
[打印本頁]
作者:
missbb
時間:
2015-8-23 15:33
標題:
只選兩個工作表的值與格式另存新檔
this workbook內有多張工作表, 想取attendance report (**
想只存值與數字格式, 不包括程式
**)及ee data 另存一個新WORKBOOK 名為leave reocord
下列出現未能知道COPY屬性的錯誤, 求教?
Sub saveanother_leave()
Dim xPath As String
Dim Arr As Variant
xPath = Application.ActiveWorkbook.Path
Arr = Array("attendance report", "ee data")
Sheets(Arr).Copy = Application.NewWorkbook
ActiveWorkbook.SaveAs xPath & "Leave Record" & ".xls"
ActiveWorkbook.Close
End Sub
複製代碼
作者:
lpk187
時間:
2015-8-23 17:08
回復
1#
missbb
Sub saveanother_leave()
Dim xPath As String
Dim Arr As Variant
xPath = ThisWorkbook.Path & "\"
Arr = Array("attendance report", "ee data")
Sheets(Arr).Copy
ActiveWorkbook.SaveAs xPath & "Leave Record" & ".xls"
ActiveWorkbook.Close
End Sub
複製代碼
作者:
missbb
時間:
2015-8-23 18:36
回復
2#
lpk187
因ATTENDANCE DATA是有很多FORMULA, 想同時只COPY 值與數字格式, 是要SAVE 新檔之後做, 還是可以同時做 ?
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)