gurunathblessings
New Member
- Joined
- Sep 15, 2016
- Messages
- 22
Hi,
I have been trying to add this CSV data to excel using the following VBA code but could not.
Anyway, I only require the first date with the adjacent details. Meaning I only require 2018 Sep 10 details. I am studying about comets and there are about 993 comets being identified. Meaning Cell A2 contains details of one comet for 2018 Sep 10 and Cell A3 should contain details of another comet but for the same date. I was trying to create a code for different date options but could not. As for now, I need not worry about the 993 comets. All I need to transfer one data successfully. I could able to the next.
Here is the code I have been trying to use.
My code could work until Set Doc=IE.document and nothing been transferred to the excel worksheet.
I am fully aware that my codes could be wrong or incomplete. My knowledge of VBA is very very limited.
I have been trying to add this CSV data to excel using the following VBA code but could not.
Anyway, I only require the first date with the adjacent details. Meaning I only require 2018 Sep 10 details. I am studying about comets and there are about 993 comets being identified. Meaning Cell A2 contains details of one comet for 2018 Sep 10 and Cell A3 should contain details of another comet but for the same date. I was trying to create a code for different date options but could not. As for now, I need not worry about the 993 comets. All I need to transfer one data successfully. I could able to the next.
Here is the code I have been trying to use.
HTML:
Sub Comets
Dim IE As New InternetExplorer
'IE.Visible=True
IE.navigate "https://in-the-sky.org/ephemeris.php?startday=10&startmonth=9&startyear=2018&ird=1&irs=1&ima=1&iph=0&ias=0&iss=0&iob=1&interval=0&tz=0&format=csv&objtype=3&objpl=21P%2FGiacobini-Zinner&objtxt=21P%2FGiacobini-Zinner
Do
DoEvents
Loop Until IE.readyState=READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc=IE.document
End Sub
My code could work until Set Doc=IE.document and nothing been transferred to the excel worksheet.
I am fully aware that my codes could be wrong or incomplete. My knowledge of VBA is very very limited.