ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert date from dbf files (https://www.excelbanter.com/excel-programming/354490-convert-date-dbf-files.html)

Alex St-Pierre

Convert date from dbf files
 
I open a dbf file from vba and would like to convert all date to excel
format. Does it is possible to test the dbf column format (ex: Date 8.0) ?
I have try this but doesn't work.
Thanks!
Dim Data As Date
Set rng = wks.Rows(1).Find(DateValue(Data), LookAt:=xlWhole)
If Not rng Is Nothing Then rng.EntireColumn.NumberFormat = "yyyy/mm/dd;@"

Alex St-Pierre

Alex St-Pierre

Convert date from dbf files
 
Workbooks.Open "c:\data.dbf"
Does it exist a function that allow me to know what is the dbf format for a
specific column ? with that, I will be able to ask each column.
Or, does it have a function that keeps the dbf format when you open a dbf
files ?
Thank you.
--
Alex St-Pierre


"Alex St-Pierre" a écrit :

I open a dbf file from vba and would like to convert all date to excel
format. Does it is possible to test the dbf column format (ex: Date 8.0) ?
I have try this but doesn't work.
Thanks!
Dim Data As Date
Set rng = wks.Rows(1).Find(DateValue(Data), LookAt:=xlWhole)
If Not rng Is Nothing Then rng.EntireColumn.NumberFormat = "yyyy/mm/dd;@"

Alex St-Pierre



All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com