View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rinze Smit Rinze Smit is offline
external usenet poster
 
Posts: 7
Default running macro step by step different from normal run??

hello,
The import part is not missing. It's:

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))

The Workbooks.Open.... is recorded with the macrorecorder. It opens the
textfile and converts it to an Excelfile.

I don't really understand what you mean by 'localised'. I only want to open
a textfile and I don't understand why my macro works OK when using it step
by step or with the 'play-button' and NOT OK when I start the macro with the
toolbarbutton.

Thanks for your imput.

Rinze Smit
Revalidatie Friesland.

"keepITcool" wrote in message
ft.com...

and that part of the code is missing.
would be nice had you mentioned it in your first post.

it depends on how the text files are SAVED.
are the SAVED copies "localized" or in USEnglish format?

Following is possible only in excel XP and excel 2003:
for localized files add Local:=true parameter to the Opentext call.
for USenglish files add Local:=false.


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


Rinze Smit wrote :

So it looks like something changes with de decimal sign (comma or
point), but I can't figure out why.