Consulting

Results 1 to 10 of 10

Thread: Solved: Format error?

  1. #1

    Solved: Format error?

    Hey everyone.

    Currently I have

    [VBA] textbox1.Text = Format(Cells(1, 1), "000")[/VBA]

    Yet I get the error where "Format" is highlighted with error message:

    [Cant find project or Library]

    What could be the cause of this? I had it working the other day but am baffled as to why it isn't currently working.

    Any help greatly appreciated!

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,362
    Location
    Greetings,

    No guarantees, but if you loaded (opened) the workbook on a machine w/an older version of Excel, this can happen.

    In VBE, under the Tools command, select 'References..."

    See what library is missing.

    Hope this helps,

    Mark

  3. #3
    Mmm I tried finding references but wasn't sure which ones to add. I added a formatting one but it said unable to add.

    Also It was create on my computer (excel 2003) then worked on on a different comp (excel 2003) now its not working on mine again. So I'm pretty sure its only used excel 2003 thus far.

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,362
    Location
    After bringing up the references dialog, see if there is one that is ticked, but notes... MISSING: (then the library name)

  5. #5
    Ok there does happen to be one.

    MISSING: Ref Edit Control

    What does that mean? Am I meant to download this library off the internet?

  6. #6
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,362
    Location
    No. I would select the MISSING item, and copy down the info below a bit on the dialog, as to the missing file's name. Then scroll down and see if you find a similar library, usually maybe a version earlier.

    If so, select the available version (that is tick the box for it) and deselect the Missing one.

    Hope this helps,

    Mark

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,264
    Location
    Usually it is sufficient to just uncheck it, and not bother finding an alternative. It happens when someone may have set a reference in testing, but not for something needed in this project.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    Just uncheck the reference(s) that are marked as MISSING.

    No need to download anything or install anything.

    Unless you are actually using a RefEdit control somewhere.

  9. #9
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,362
    Location
    @ Bob and Norie: Good points and thanks. Mark

  10. #10
    Haha I can't believe that's all it was! Thanks so much guys for your help. Appreciate it so much!

Posting Permissions

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