View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
It'sme It'sme is offline
external usenet poster
 
Posts: 1
Default Opening dif format sheet via VBA


Hi all,
I have something odd happening when trying to open a sheet via a VB
macro.

I download a file from a midrange system as a DIFF file format t
import into MS Excel 2003via a simple VBA Macro.

Now when I open that sheet manually, there is a date column which i
formatted as ddmmyyyy and it displays correctly. This is the dat
format I need.

When my macro opens that same sheet, then the date gets reversed a
mmddyyyy.

The vba code I am using (and copying in here freehand) is very straigh
forward:

Code
-------------------

Sub LoadData()
Dim ipname
ipname = "I12dailyCPT.xls"
Workbooks.Open FileName:=
"C:\Documents and Settings\Itsme\Desktop\" & ipname"
End Sub

-------------------


As I say when I look at the sheet that when opened by the macro tha
date is changed around. The first thing I do after loading the sheet i
to validate the date so I'm kinda stuck

I need to understand why this is happening before I can even thin
about how to fix it or work around it.

Greatly appreciate any help

--
It'sm
-----------------------------------------------------------------------
It'sme's Profile: http://www.excelforum.com/member.php...fo&userid=2950
View this thread: http://www.excelforum.com/showthread.php?threadid=49211