none
Compilation error RRS feed

  • Question

  • Hello,

    In Project Pro 2010 VBA , the following function returns an error:

    MsgBox "you are on an empty row" & Chr(13) & "Select  a milestone"

    "Compilation error; Project or library not found" and the Chr is selected.

    Why did I miss?

    Thanks

    Wednesday, June 5, 2013 1:18 PM

Answers

  • WLID1966,

    Use vbcr or vblf instead of Chr(13).

    When I first started writing VBA code many years ago I always used Chr(13). Some years later I found the Chr function no longer worked or didn't work reliably with all configurations so I converted to using the aforementioned constants.

    Hope this helps.

    John

    • Marked as answer by WLID1966 Wednesday, June 5, 2013 4:12 PM
    Wednesday, June 5, 2013 2:40 PM

All replies

  • WLID1966,

    Use vbcr or vblf instead of Chr(13).

    When I first started writing VBA code many years ago I always used Chr(13). Some years later I found the Chr function no longer worked or didn't work reliably with all configurations so I converted to using the aforementioned constants.

    Hope this helps.

    John

    • Marked as answer by WLID1966 Wednesday, June 5, 2013 4:12 PM
    Wednesday, June 5, 2013 2:40 PM
  • Thanks a lot John!
    Wednesday, June 5, 2013 4:13 PM
  • WLID1966,

    You're welcome and thanks for the feedback.

    John

    Wednesday, June 5, 2013 5:23 PM