|
Sub 复制工作表()
Dim i As Integer
For i = 1 To 10
Sheets("sheet1").Copy after:=Sheets(Sheets.Count)
Select Case i
Case i = 1
Sheets(Sheets.Count).Name = "中国电子1"
Case i = 2
Sheets(Sheets.Count).Name = "中国电子2"
Case i = 3
Sheets(Sheets.Count).Name = "中国电子3"
Case i = 4
Sheets(Sheets.Count).Name = "中国电子4"
Case i = 5
Sheets(Sheets.Count).Name = "中国电子5"
Case i = 6
Sheets(Sheets.Count).Name = "中国电子6"
Case i = 7
Sheets(Sheets.Count).Name = "中国电子7"
Case i = 8
Sheets(Sheets.Count).Name = "中国电子8"
Case i = 9
Sheets(Sheets.Count).Name = "中国电子9"
Case i = 10
Sheets(Sheets.Count).Name = "中国电子10"
End Select
Next i
End Sub
我想要实现的效果是复制工作表sheet1并按照自己的想法去定义工作表名称,但是为何代码不可以实现工作表名称的更改呢?求高手帮忙?
|
|