Consulting

Results 1 to 6 of 6

Thread: Code runs on Office XP but not on Office 2003

  1. #1
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location

    Code runs on Office XP but not on Office 2003

    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.

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    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.

  3. #3
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location

    Bingo, That worked

    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?

  4. #4
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location

    Can anyone answer this question for me.

    Quote Originally Posted by peacenik
    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???

  5. #5
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    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.
    Kind Regards,
    Ivan F Moala From the City of Sails

  6. #6
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location
    Thanks. I was hoping for a different answer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •