ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Annoying bug. (https://www.excelbanter.com/excel-programming/273791-annoying-bug.html)

Shunt

Annoying bug.
 
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

Tom Ogilvy

Annoying bug.
 
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.

--
Regards,
Tom Ogilvy

"Shunt" wrote in message
...
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





All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com