Copy sheet and get resulting sheet object?

后端 未结 13 1970
醉梦人生
醉梦人生 2020-11-28 12:21

Is there any easy/short way to get the worksheet object of the new sheet you get when you copy a worksheet?

ActiveWorkbook.Sheets(\         


        
13条回答
  •  有刺的猬
    2020-11-28 13:07

    Dim sht 
    
    With ActiveWorkbook
       .Sheets("Sheet1").Copy After:= .Sheets("Sheet2")
       Set sht = .Sheets(.Sheets("Sheet2").Index + 1)
    End With
    

提交回复
热议问题