农历生日查询 农历转阳历生日查询( 二 )


bit = NongliData(i1)
For i3 = 1 To i2 Step 1
bit = Int(bit / 2)
Next
bit = bit Mod 2
theDate = theDate + 29 + bit
Next
Next

If (NongliData(m) < 4095) Then
monthCount = 11
toCurMonthCnt = monthCount - LunarMonth + 2
Else
monthCount = 12
toCurMonthCnt = monthCount - LunarMonth + 1
LeapMonth = Int(NongliData(m) / 65536)
If LunarMonth <= LeapMonth Then toCurMonthCnt = toCurMonthCnt + 1
End If

For i2 = monthCount To toCurMonthCnt Step -1
bit = NongliData(m)
For i3 = 1 To i2 Step 1
bit = Int(bit / 2)
Next
bit = bit Mod 2
theDate = theDate + 29 + bit
Next

LTG = DateAdd("d", theDate, "1921/2/8")

If irow = 1 Then
Sheet1.Cells(1, 10) = "'" & LTG
Else
Sheet1.Cells(irow, 4) = "'" & LTG
End If
End Function
Private Sub CommandButton1_Click()
If IsDate(Sheet1.Cells(1, 9)) = True And IsNull(Sheet1.Cells(1, 9)) = False And Sheet1.Cells(1, 9) <> "" Then
aaa = LTG(Sheet1.Cells(1, 9), 1)
End If
Dim i As Integer
For i = 2 To 100
Sheet1.Cells(i, 4) = ""
If Sheet1.Cells(i, 2) <> "" And IsNull(Sheet1.Cells(i, 2)) = False And IsDate(Sheet1.Cells(i, 2)) = True Then
If Sheet1.Cells(i, 3) = "Y" Then
bbb = LTG(Sheet1.Cells(i, 2), i)
Else
Sheet1.Cells(i, 4) = "'" & Sheet1.Cells(i, 2)
End If
Else
Application.DisplayAlerts = False
Application.Quit
End If
Next i
End Sub


以上关于本文的内容,仅作参考!温馨提示:如遇专业性较强的问题(如:疾病、健康、理财等),还请咨询专业人士给予相关指导!

「辽宁龙网」www.liaoninglong.com小编还为您精选了以下内容,希望对您有所帮助: