excel中通过vba如何在工作簿中寻找的工作表并使之成为当前工作表

如题所述

第1个回答  2014-01-23
'假设你的工作薄中有temp5个工作表
'例如5个,下面的程序你先看,选我为正确答案有问题可以问我哦
temp5=5
Windows(a).Activate
For tempa = 1 To temp5

temp = Worksheets(1).Name
If temp = asd Then
Sheets(temp).Select
End If
next tempa
第2个回答  2014-01-23
请参考以下代码
tmpsh="要查找的工作表名"
ifind=false
for i=1 to sheets.count
if sheets(i).name=tmpsh then ifind=true:exit for

next
if ifind=true then sheets(i).select本回答被提问者和网友采纳
第3个回答  2014-01-23
activesheet.select
添加这句话就行
相似回答