Amigos tenho esta função que exporta os dados em um arquivo ja existente no dir do BD
Preciso que ao ser executada.. abra o fileDialog e de a opção de local e novo nome para o arquivo...
Public Sub WriteAllPhases()
' Phase: 0 = NewMoon, 1 = First Qrtr., 2 = Full, 3 = Last Qrtr.
Dim I As Long
Dim FileNumber As Integer
FileNumber = FreeFile
Open CurrentProject.Path & "\Phases.txt" For Output As #FileNumber
For I = -22546 To 99898
Print #FileNumber, Format(str(I), "#00000") & " " & _
"LUA NOVA " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 0)), "mm/dd/yyyy hh:mm:ss") & " " & _
"FIRST QUARTER " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 1)), "mm/dd/yyyy hh:mm:ss") & " " & _
"LUA CHEIA " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 2)), "mm/dd/yyyy hh:mm:ss") & " " & _
"LAST QUARTER " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 3)), "mm/dd/yyyy hh:mm:ss")
Next
Close
End Sub
Grato pela ajuda
Preciso que ao ser executada.. abra o fileDialog e de a opção de local e novo nome para o arquivo...
Public Sub WriteAllPhases()
' Phase: 0 = NewMoon, 1 = First Qrtr., 2 = Full, 3 = Last Qrtr.
Dim I As Long
Dim FileNumber As Integer
FileNumber = FreeFile
Open CurrentProject.Path & "\Phases.txt" For Output As #FileNumber
For I = -22546 To 99898
Print #FileNumber, Format(str(I), "#00000") & " " & _
"LUA NOVA " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 0)), "mm/dd/yyyy hh:mm:ss") & " " & _
"FIRST QUARTER " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 1)), "mm/dd/yyyy hh:mm:ss") & " " & _
"LUA CHEIA " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 2)), "mm/dd/yyyy hh:mm:ss") & " " & _
"LAST QUARTER " & Format(JulianDaysToUT(MoonPhaseByLunation(I, 3)), "mm/dd/yyyy hh:mm:ss")
Next
Close
End Sub
Grato pela ajuda