Results 1 to 4 of 4

Thread: Runtime Error 91

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Exclamation Runtime Error 91

    When i run this code i get this error
    Runtime Error 91:
    Object variable or With block variable not set.
    on this line:
    Code:
    xp.Folder.Copy App.Path & "\appfiles\", "C:\Program Files\"
    Does anybody know what is up with this code.

    Thanks in advance
    Chris1990
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Runtime Error 91

    Chris,

    Code:
    xp.Folder.Copy App.Path & "\appfiles\", "C:\Program Files\"
    I think if you can post few lines above the above line of code, would be help full.

  3. #3
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Runtime Error 91

    It means you are trying to use an object and vb doesn't know where or what the object is. I am guessing it is the xp thing. You have to add a reference to some objects or use the complete "object path"
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Runtime Error 91

    Where did you define and instanciate xp?

Posting Permissions

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



Click Here to Expand Forum to Full Width