Strange Formatting Issue

Sajukai

New Member
Joined
Mar 12, 2015
Messages
12
I am querying a worksheet using ADODB via Microsoft.Jet.OLEDB.4.0. The tool was working fine previously but since reopening it, one column now always results in a NULL return despite having data. The other columns return fine. The column in question is a time formatted column. When I checked the formatting of the column, excel has added a .PD suffix. If I go to the HOME ribbon and select the format list, it shows time as 08:30:00.PD. When selecting that format any column for time formatting will now place .PD after the time. This is the auto excel Time format, not a custom one.

Anyone know why it is doing this?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Just to add some extra info, this is an XLSM file, Excel 2010.

The column heading having the issue is "NEW_LENGTH". If I add a new column, call it "NEW_LENGTH" and take the former and call it "x", put the formula back in and custom format to "hh:mm" and run the code, it works fine. But if I save the file, close and re-open and run the code, then it reverts back to an error of NULL return for that columns contents, and again back to hh:mm:ss.PD format. There is nothing in the code to alter the format. It's a simple ADODB connection to the worksheet and SQL query to select data. The SELECT query returns all columns of data except this one, which keeps resulting in NULL despite values being present.

Wondering if maybe the workbook has just become corrupt? Sooo wierd.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,293
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top