为什么不能添加新工作表?

The first column in sheet1 in workbook total.xlsx contains all the names, and I'm reading it with :

For rowId = 2 To wb_total.Sheets(1).Range("A65535").End(xlUp).Row
    fname = Replace(wb_total.Sheets(1).Cells(rowId, 1), " ", "")
    debug.print fname
Next rowId

debug.print的输出,例如:

x1
x2

All name's in total.xlsx column 1 ,about 80.

Now I want to add new sheets in total.xlsx, every new sheet assigned fname.

这是我的整个代码段:

Dim wb_total As Workbook  
Dim rowId As Integer
Dim fname As String
Set wb_total = Workbooks.Open("e:\total.xlsx")
For rowId = 2 To wb_total.Sheets(1).Range("A65535").End(xlUp).Row
    fname = Replace(wb_total.Sheets(1).Cells(rowId, 1), " ", "")
    wb_total.Worksheets.Add().Name = fname
Next rowId

我遇到了这个问题:

reopening will cause issue

评论