Annoying bug.

  • Thread starter Thread starter Shunt
  • Start date Start date
S

Shunt

I keep recieveing an application error whenever i run ths
code but I am not sure why.

Here is the code (The part that matters anyhow):

'...open the superval file into excel
Workbooks.OpenText Filename:=PName,
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, Semicolon:= False, Comma:=False, Space:=False,
Other:=False, FieldInfo:=Array(1, 1)

Workbooks(Prog_Name).Worksheets("Cat
Data").Columns(1).Value = Workbooks(FName).Worksheets
(1).Columns(1).Value

The compiles and run but only get down to a cell where the
value is "=======================================" could
this be the reason it is crashing. It also might be
because there is a limit of around 8000 rows but I doubt
it.

Any ideas where I am going wrong?

Thanks in advance
 
You say you get an application error, but then you also say you get down to
a line that contains something - if a one line command works, it generally
completes its action or errors and does nothing - so your desciption is
somewhat confusing. Your two lines of code don't seem to relate. You
opentext PName, then use Fname to refer to one of the workbooks. You also
don't say what the error message is.
 
Back
Top