[英]COPY VALUES, NO FORMULAS. EXCEL VBA
I am writting a code to copy a sheet from one workbook(W1) to another workbook(W2). 我正在编写代码以将工作表从一个工作簿(W1)复制到另一工作簿(W2)。 I know how to do it, but the problem is the copied sheet in W2 still has the formulas and references from W1, and I don't want that I just want the values.
我知道该怎么做,但是问题是W2中的复制工作表仍然具有W1中的公式和引用,并且我不希望我只想要这些值。
This is my code to copy the sheet: 这是我复制工作表的代码:
Set W1 = Workbooks("REPORT1.xlsx")
Set W2 = Workbooks("REPORT2.xlsx")
W1.Sheets("TEST").Copy After:=W2.Sheets(wb.Sheets.Count)
Any thoughts. 有什么想法吗。 Thanks
谢谢
Set W1 = Workbooks("REPORT1.xlsx")
Set W2 = Workbooks("REPORT2.xlsx")
W1.Sheets("TEST").Copy After:=W2.Sheets(wb.Sheets.Count)
ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.