《土方法玩编程》:主打土到掉渣,图到掉渣,先上图敬土地:
如上图所示:
(1)选择一个按钮
(2)在WPS表格上拖动建立一个按钮,设置好文字和宏代码链接
(3)进入WPS宏编辑器,添加一个模块
(4)输入代码:
Public Sub WPS01_001()
Dim myVersion As String
Select Case Application.Version
Case “8.0”
myVersion = “WPS97”
Case “9.0”
myVersion = “WPS2002”
Case “10.0”
myVersion = “WPS2003”
Case “11.0”
myVersion = “WPS2007”
Case “12.0”
myVersion = “WPS2010”
Case Else
myVersion = “WPS版本未显示”
End Select
MsgBox “WPS 版本是: ” & myVersion
End Sub
(5)点击表格上的按钮,输出弹窗结果
Views: 141