V
veggiesaregood
I have written a VBA macro that reads values from spreadsheets in
closed workbooks as part of its routine. The macro works fine,
however, the spreadsheets being read are automatically generated by a
MATLAB application. That application basically writes tab delimited
data into a .xls file.
My problem is this. If I run the macro after the spreadsheets have
been generated, the macro will get a #REF error anytime it tries to
read a value from any of the spreadsheets. However, if I simply copy
all the values in the spreadsheet and paste them into a blank
spreadsheet and then save this new spreadsheet to overwrite the old one
then the macro can read all of the values without any problem
Basically, I am trying to figure out what is wrong with the formatting
of the data in the automatically generated spreadsheets that causes the
macro to be unable to read them. I am confused because copying and
pasting the data solves the problem.
All the data is numbers.
Thanks a lot!
closed workbooks as part of its routine. The macro works fine,
however, the spreadsheets being read are automatically generated by a
MATLAB application. That application basically writes tab delimited
data into a .xls file.
My problem is this. If I run the macro after the spreadsheets have
been generated, the macro will get a #REF error anytime it tries to
read a value from any of the spreadsheets. However, if I simply copy
all the values in the spreadsheet and paste them into a blank
spreadsheet and then save this new spreadsheet to overwrite the old one
then the macro can read all of the values without any problem
Basically, I am trying to figure out what is wrong with the formatting
of the data in the automatically generated spreadsheets that causes the
macro to be unable to read them. I am confused because copying and
pasting the data solves the problem.
All the data is numbers.
Thanks a lot!