I have an Excel Comma seperated values file (A) and a macros file (B). On my machine B reads A perfectly but on another machine B does not read 2 columns which are formatted custom H:mm:ss.
Does anyone know why this would happen, or what I can do to fix it.
I don't understand how you have a macro file. A WORKBOOK with a macro, yes. Macros cannot be independently run unless you compile and run as an executable.
What do you mean by, "...does not read 2 columns..."
How are you "reading" the csv?
Does it COMPLETELY not import ANYTHING?
Does it "read" but with a different format?
Please post an example of what is happeneing under what conditions.
Yes Sorry I should have done that at the start!. I have a workbook with macros in it.
This is the code
Set m_conXLS = CreateObject("ADODB.Connection")
Set m_rsXLS = CreateObject("ADODB.RecordSet")
Set rs = CreateObject("ADODB.RecordSet")
Set rs1 = CreateObject("ADODB.RecordSet")
While Not m_rsXLS.EOF
If IsDate(m_rsXLS.fields(0)) Then
sSQL = "MCK_iqPhoneList '" & m_rsXLS.fields(0) & "','" & m_rsXLS.fields(1) & "','" & m_rsXLS.fields(2) & "'"
objConn.Execute sSQL
End If
m_rsXLS.movenext
Wend
m_rsXLS.fields(1) and m_rsXLS.fields(2) are fields that contain the time.for example below is what I am reading.
Jan 1, 2007 10:03:14 PM 10:03:36 PM
When I print the sSQL statement on my machine its shown as
'Jan 1, 2007','10:03:14 PM','10:03:36 PM'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.