PDA

View Full Version : [SOLVED:] Code runs on Office XP but not on Office 2003



peacenik
08-31-2005, 01:39 PM
I have this code that will run without issues on Office XP but is not running on Office 2003.

I had to explicitly declare all my variables, (I know, I should do that anyway) but I am still getting an error in this code.



Function findalphacolumn(ColumnNo) As String
If ColumnNo > 26 Then
findalphacolumn = Chr(Int(ColumnNo / 26) + 64) & Chr((ColumnNo Mod 26) + 64)
Else
findalphacolumn = Chr(ColumnNo + 64)
End If
End Function

The error I am getting is "Can't find project or library" and the first chr() is highlighted. Any ideas. http://vbaexpress.com/forum/images/smilies/banghead.gif

Jacob Hilderbrand
08-31-2005, 01:54 PM
See if you have a missing reference for the workbook. Tools | References. It would be near the top and read Missing in front. Uncheck it.

peacenik
08-31-2005, 03:51 PM
I was fiddling with some new controls for my forms. I decided not to use them but obviously the links were still there.

This begs the question, if I wanted to use them and distribute to others how do include these references in the spreadsheet?

peacenik
09-04-2005, 10:38 PM
I was fiddling with some new controls for my forms. I decided not to use them but obviously the links were still there.

This begs the question, if I wanted to use them and distribute to others how do include these references in the spreadsheet?

My original problem has been solved but can anyone answer this question before I mark it solved???

Ivan F Moala
09-05-2005, 12:52 AM
If the target machine does not have these control(s) then they can't run it as you have discovered when using on another machine.

peacenik
09-05-2005, 04:48 AM
Thanks. I was hoping for a different answer.