从VBA转到VB6该如何转,请教大虾,先谢谢
Dim i, k As IntegerDim KH(100) As String
Dim DS(100) As Double
Dim WD(100) As Double
i = 1
k = 1
wjm = "d:\上传\" & CStr("SW-" & Month(Date) & "-" & Day(Date) & "-" & Hour(Time) & "-" & Minute(Time) & "-" & Second(Time)) & ".txt"
Do While Application.ActiveWorkbook.sheets("4-水位").cells(35 + i - 1, 5).Value <> ""
KH(i) = ActiveWorkbook.sheets("4-水位").cells(35 + i - 1, 5).Value
DS(i) = ActiveWorkbook.sheets("4-水位").cells(35 + i - 1, 6).Value
WD(i) = ActiveWorkbook.sheets("4-水位").cells(35 + i - 1, 8).Value
i = i + 1
Loop
Open wjm For Output As #1
Print #1, ActiveWorkbook.sheets("4-水位").cells(33, 6).Value
For k = 1 To i - 1
Print #1, "NO="; CStr(KH(k)); Spc(1); "0"; CStr(VBA.Format(DS(k), "0.0") * 10); Spc(1); "0"; CStr(VBA.Format(WD(k), "0.0") * 10)
Next k
Close