如何打开并复制值到新的工作表时,它不活跃?

我从一张纸复制了一个值,并试图将其粘贴到另一张纸上。 问题是我打开第二张纸的方式。 我必须打开Excel工作表,然后使用activate方法打开第二个工作表并将其粘贴。 有没有其他方式可以通过给定的path或东西直接打开表单?

Dim FindV As Range Dim col, col1 As Long Dim FAV, CC As String //Relevant Working Code present here// Selection.Copy Windows("DS.xlsx").Activate Set FindV = Range("A1:Z100").Find(What:="Dec Rel", LookIn:=xlValues, LookAt:=xlWhole, _ MatchCase:=False, SearchFormat:=False) FAV = FindV.Address(RowAbsolute:=False, ColumnAbsolute:=False) ActiveCell = Range(FAV).Offset(0, 1) ActiveCell.Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False 

怎么样

FindV.Offset(0, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False

Set FindV下面的一行,你不需要rest