Function shzhdy(b, Optional c = 0)
If c = 0 Then
If InStr(b, "!") > 0 Then '有工作表名称时
a = Split(b, "!")
Name = a(0)
w = a(1)
Else
Name = ActiveSheet.Name
w = b
End If
Else
Name = c
w = b
End If
Sheets(Name).Select
Sheets(Name).Range(w).Select
'Range("G24").Activate
ActiveSheet.PageSetup.PrintArea = w
End Function
怎么把上面代码封装成类?