Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format in VBA 2000 (Excel 2000)

    I'm running a macro written in Excel 2000 in XP and it is missing an Preferance. The error is on a specific format instruction.

    Thanks for the help

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format in VBA 2000 (Excel 2000)

    Do you mean a Reference? If so, which one is missing? Otherwise, what do you mean?

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format in VBA 2000 (Excel 2000)

    Mario: Your questions is a bit like my saying: "My car doesn't run. Can you tell me why?" <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Can you tell us what error message you are getting and show us the code that causes it?
    Legare Coleman

  4. #4
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format in VBA 2000 (Excel 2000)

    Sorry I had to rush to get the code on the board.

    The code was done in Excel 2000. It runs on an onclick event on the form. The code is the following:

    Acc_Sup_No = Format(Cells(crno, (Range("Acc_Sup_No").Column)), "0##-###")

    On Excel XP when the click event fires it stops on the above code and reports that the relevant referances is not available.

    Thanks

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format in VBA 2000 (Excel 2000)

    So, <big>WHICH</big> reference is missing?

    In the Visual Basic Editor, select Tools | References...
    One of the checked entries probably reads MISSING: ...
    Make note of this reference - the lower half of the References dialog displays information about it
    Clear the check box of the MISSING reference, then click OK.
    Try to tun the code again. If it works, fine.
    If it doesn't, you'll have to find out where the equivalent of the missing reference is on your PC, then set it. You may have to use the Browse... button in the References dialog.

  6. #6
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format in VBA 2000 (Excel 2000)

    Thanks for the quidance.
    It was missing the Microsoft Excel 9.0 Object Library.

    Thanks for the help

Posting Permissions

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