刚给你写了个属相查询的的的代码,中文不好用、就用英文和汉语拼音写了下
Sub test2()
Dim iptValue As String
Dim iptY As Integer
Dim iptMD As Integer
Dim modVal As Integer
Dim yearTimes As Integer
Dim shuxiang As String
iptValue = InputBox("Please input Date(Like 19900101)")
iptY = Left(iptValue, 4)
iptMD = Right(iptValue, 4)
modVal = iptY - 1990 + 1
yearTimes = Abs(modVal) / 12
If (modVal > 12) Then
modVal = Abs(modVal) - (12 * yearTimes)
ElseIf modVal Zhe里是把1990年作为基准年开始查询属相的、
作为参考、星座座就能写出来,、