PDA

View Full Version : [SOLVED] Opening Text files



psittacus
06-14-2005, 09:48 AM
Hi, I'm trying to write a subroutine that automatically opens a tab deliniated text file and I keep getting a "expected variable or function" error for the following line:


With Application
.Workbooks.OpenText(Filename:=InputName, Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth, Fieldinfo:=
Array(1, 1, 1, 1, 1, 1, 1, 1))
End With


This isn't the whole code, just the bit that's giving me grief. Any help would be appriciated.
Thanks

austenr
06-14-2005, 02:12 PM
When you step through the code using F8, where does it error out at? Does it highlight anything? Sounds like a syntax error.

Norie
06-14-2005, 02:21 PM
This isn't the whole code, just the bit that's giving me grief. Any help would be appriciated.

Can we see the rest of the code, it could be relevant?

psittacus
06-14-2005, 09:20 PM
Sorry, it was just a syntax error.