Using the file that you sent to me, I found the problem - it was with the
name of the list box on that sheet. The same problem was on one or two other
sheets also. I'm not sure where the problem really was created. More on
that later.
In your code the list box on sheet7, Chart-Heat Flux, was being referred to
as Sheet7.LST_Energy.Clear and on sheet 71, Chart-Diel Temp, the list box was
being referred to as Sheet71.LST_Temps.Clear. I think a similar situation
may have existed in a 3rd sheet. Problem was that those list boxes were not
named LST_Energy or LST_Temps, they had the original name given to them by
the system, ListBox1 and so Excel 2007 could not find them. I changed their
names and the code appears to function properly now.
The reason I said that I'm not sure where the problem really is/was because
I went back and looked at the Excel 2003 file and the names were incorrect in
it also, so it's curious that the code functions properly in that file.
Initially I thought that the conversion to 2007 had 'lost' the names of some
of them, but that doesn't appear to be the case.
Otyokwa said:
Is there a way to get a screen shot to you?
The initial error says:
"Compile Error Method or data member not found" Then it shows what sheet
is missing or has an error which is sheet 7.lst.energy.clr
However, the sheet is fine before it is converted. I have tried this with
more than one file and it happens each time...The line of code highlighted is
Sub SubUpdateLists ()
Thanks
:
A starting point for analysis:
First - what does the VB Error say? What error number does it report?
Second, when the error comes up next time, click the [Debug] button and see
what line of code is highlighted - that's the line generating the error. It
would then help if you post the entire section of code (entire sub or
function) and let us know which line in it is the problem statement.
:
I am having a problem converting an excel 2003 spreadsheet with macros. It
opens and runs fine if I open it as the original version. However if I
convert it or save as a excel macro-enabled workbook (2007) then try to run
the macros, I get a visual basic error. Any suggestions?
Thank you
DMR