View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default running macro step by step different from normal run??


your code opens the file
then reopens the same file via opentext method.

the first line can be removed.

re "localized"
open one of the txt files with notepad.

If numbers are stored with . as decimal separator
and dates appear in mmddyy then USenglish format is used.
open with
Opentext(..... Local:=false)

If numbers are stored with , as decimal and ddmmyy dates
then use
Opentext(....... Local:=True)

Local parameter is ONLY valid if you have Excel XP or newer!!
will generate error on older versions.

Else mail me 1 of the txt files and the workbook with the code.
and I'll have a look.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Rinze Smit wrote :

Set myBook = Workbooks.Open(pathToUse & myFile)
Workbooks.OpenText Filename:=pathToUse & myFile, Origin:=xlMSDOS _
, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0,
1), Array( _
6, 1), Array(37, 1), Array(47, 1))