Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a sheet | Excel Discussion (Misc queries) | |||
Excel blank sheet opening but the sheet has data | Excel Discussion (Misc queries) | |||
Opening blank sheet with set format | Excel Discussion (Misc queries) | |||
When opening-file format is not valid | Setting up and Configuration of Excel | |||
opening on same sheet | Excel Programming |