PDA

View Full Version : Excel Compatibility 2007 back to 2002



bigger312
11-18-2011, 06:53 AM
:banghead:
I have created an Excel data base in excel 2007 but have saved it as 1997 to 2003 .xls format. When saving I got warning based on table formatting only.
I burnt my project to disc and loaded onto PC operating the older 2003 excel .

But when I tried to run the user form I am getting a

Compile error stating "Can't find Project or Libery and the word Format is highlighted in the following line of code.


MultiPage1.Value = 0

Comdate.Text = Format(Now() + 1,"DD/MM/YYYY")

ComdateB.Text =Format(Now() + 1, "DD/MM/YYYY")

ComdateC.Text =Format(Now() + 1, "DD/MM/YYYY")

ComdateD.Text =Format(Now() + 1, "DD/MM/YYYY")

ComdateM.Text =Format(Now() + 1, "DD/MM/YYYY")

ComdateE.Text =Format(Now() + 1, "DD/MM/YYYY")
I deleted this code and the debugger went on to pick up


Private Sub CmdclearA_Click()

' Clear the Form

For Each Ctl In Me.Controls

IfTypeName(Ctl) = "TextBox" Or TypeName(Ctl) = "ComboBox"Then

Ctl.Value= ""

End If
Driving me nuts. Can any one suggest a solution. I have spent a long time putting the project together as I am new to VBA and had a steep learning curve.

Can I avoid starting from scratch and start building the project on the older excel program,

Gerry
Ireland

frank_m
11-18-2011, 04:15 PM
Do to the fact that forward compatibility does not and could not exist, errors such as yours are comman. - As I think you realize now, the rule of thumb is: "always develop pojects in the lowest version that they will be used in"

With that said, it may take a very long time to work with you here to correct the issues, by seeing only small snipets of the code. It would be far easier If you post the complete subs for relevant procedures, or better yet, a sample workbook.

Also please use VBA code tags, by selecting the code with the mouse and clicking the green colored VBA button.