Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post

    Error with VBE Password (XP)

    Hi, I have an application that allows users toclone and edit reports, in this case delegate badges. If I set a VBE password to protect my code, I get an error when this line runs - DoCmd.CopyObject , stNewDocName, acReport, stDocName - any ideas how I can get around this? Thanks

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

    Re: Error with VBE Password (XP)

    One option is to make sure that the reports have no code module. You'd have to move event procedures to a standard module, change them to public functions instead of private subs, and refer to the report as CodeContextObject instead of Me. You can then use expressions such as =MyFunction() instead of [Event Procedure] in the Event tab of the Properties window. Finally, set the Has Module property of the report to No.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error with VBE Password (XP)

    That's nailed it, thanks Hans you are a star.

Posting Permissions

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