PDA

View Full Version : Solved: Make add-in compatible with Excel 2007



Djblois
01-23-2007, 03:41 PM
I know in Excel 2007 I will need to change the way I find the last row and last column. However is there anything else I will need to know to get code to work with Excel 2007. I can't test it yet because my office hasn't installed it yet but I want to have my add-in ready for when we do.

Thank you again for all your help

Bob Phillips
01-23-2007, 04:35 PM
You don't need to change anything



iLastRow = Cells(Rows.Count, "A").End(xlUp).Row


If it is an xlsx or xlsm file, it goes to 1048576, it if is in compatibility mode it just goes to 65536.

Djblois
01-24-2007, 07:08 AM
Thank you Again XLD. You are always helpful. What has been changed in VBA with this version??? My VBA editor for Excel 2003 is 6.3 and at home My VBA editor for Excel 2007 is 6.5? Do you know what changed or has been added to make it 6.5??

JonPeltier
01-24-2007, 08:47 AM
I haven't noticed any change in the VB Editor, and hadn't realized the version had been updated.

There are not a lot of changes in Excel 2007 VBA with respect to features already available in Excel 2003. The main thing you have to do is test the code to make sure you find the inconsistencies. A small number of things don't work quite as they used to, especially in charting.

Djblois
01-24-2007, 09:51 AM
But they added code to take advantage of the new features???

Djblois
01-24-2007, 09:56 AM
You don't need to change anything



iLastRow = Cells(Rows.Count, "A").End(xlUp).Row


If it is an xlsx or xlsm file, it goes to 1048576, it if is in compatibility mode it just goes to 65536.

Do I need the End(xlUp). portion of the code?

Bob Phillips
01-24-2007, 10:22 AM
But they added code to take advantage of the new features???
Mine are both version 6.5.

Thet have exposed the new elements of the object model. See http://msdn2.microsoft.com/en-us/library/aa269686(office.10).aspx (http://msdn2.microsoft.com/en-us/library/aa269686%28office.10%29.aspx) for details.

BTW, they have binned FileSearch.

Bob Phillips
01-24-2007, 10:23 AM
Do I need the End(xlUp). portion of the code?

If you are trying to determine the last used row, yes you do.

Djblois
01-24-2007, 10:25 AM
Thank you Xld