下标越界 高手帮忙
Sub恢复保存()name0=ActiveWorkbook.Namej=Sheets.CountFori=1TojSheets(1).Visible=-1Sheets(1...
Sub 恢复保存()
name0 = ActiveWorkbook.Name
j = Sheets.Count
For i = 1 To j
Sheets(1).Visible = -1
Sheets(1).Move
Sheets(1).Move after:=Workbooks(name0).Sheets(j - 1)
Next
End Sub
用excel编辑器提示下标越界 展开
name0 = ActiveWorkbook.Name
j = Sheets.Count
For i = 1 To j
Sheets(1).Visible = -1
Sheets(1).Move
Sheets(1).Move after:=Workbooks(name0).Sheets(j - 1)
Next
End Sub
用excel编辑器提示下标越界 展开
2个回答
展开全部
取消语句Sheets(1).Move,因为Sheets(1).Move会将Sheets(1)移动到新建工作薄。
Sub 恢复保存()
name0 = ActiveWorkbook.Name
j = Sheets.Count
For i = 1 To j
Sheets(1).Visible = -1
' Sheets(1).Move
Sheets(1).Move after:=Workbooks(name0).Sheets(j - 1)
Next
End Sub
Sub 恢复保存()
name0 = ActiveWorkbook.Name
j = Sheets.Count
For i = 1 To j
Sheets(1).Visible = -1
' Sheets(1).Move
Sheets(1).Move after:=Workbooks(name0).Sheets(j - 1)
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询