public sheetna as worksheet应该是类型问题我还是建议你传递sheet.name变量sub WorkOnSheet(Sheetn$) worksheets(sheetn).cells(1,1)="操作成功" end sub
应该这样吧。。。set sheetna = sheetn