我有以下代码将工作表从一个工作簿添加到另一个工作簿。但是,我只想添加值而不是公式。我如何实现这一目标?
Sub publish()
Dim new_wb As Workbook
Dim old_wb As Workbook
Dim i As Long
Dim new_file_path As String
Call refresh_output_sheets
new_file_path = Range("output_path").Value
Set old_wb = ActiveWorkbook
Set new_wb = Workbooks.Add
For Each sh In old_wb.Sheets
If InStr(LCase(sh.CodeName), "output") <> 0 Then
sh.Copy After:=new_wb.Sheets(new_wb.Sheets.Count)
End If
Next sh