1
我使用此代碼刪除活動工作表,然後複製另一個工作表,然後將複製的工作表重命名爲與刪除的工作表相同,如何還可以更改複製的工作表選項卡顏色工作表匹配刪除的工作表。Excel VBA Store/Dim sheet選項卡顏色
Dim ShtName As String
Dim ws As Worksheet
Application.DisplayAlerts = False
ShtName = ActiveSheet.NAme
ActiveSheet.Delete
Dim NewSht As Worksheet
Master_Work_Order.Copy After:=ActiveSheet
Set NewSht = ActiveSheet
'set new copied sheet name to Previous ActiveSheet's name
NewSht.NAme = ShtName