View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E AA2e72E is offline
external usenet poster
 
Posts: 400
Default VBA scripting in Excel

How are you getting the data into Excel?

Data | Import External Data + Import Data

normally understands the Date date type.

If you are using the CopyFromRecordset function, that too understands the
Date format.

ELSE:

1. Change the SQL to CAST the date columns as string

or, simply: select the columns in Excel, click Format | Cells | and then
choose Date or Custom and specify/select the format you want.

"Len" wrote:

I rarely if ever use Excel. I need to change the format of a row of data
from a Date field (data is imported incorrectly from an Oracle Database) to a
long integer.

Can I use VBA in Excel like we do in Access or SQL?

If I can a small example of how to go to the script when I open the
spreadsheet would be helpful.

Thanks in Advance!

Len