+ Reply to Thread
Results 1 to 7 of 7

problem with code

Hybrid View

  1. #1
    Ivan Raiminius
    Guest

    Re: problem with code

    Hi Ana,

    no, you don't need to set reference with late binding.
    You need to "dim fs as object" first

    Or you can set reference to "Microsoft Scripting Runtime" (early
    binding), and code like this:
    dim fs as scripting.filesystemobject
    set fs=new scripting.filesystemobject

    Regards,
    Ivan


  2. #2
    Ana
    Guest

    Re: problem with code

    if I add
    dim fs as scripting.filesystemobject

    there is an error in this line

    but my macro was working fine last week the same code (it has been working
    fine for almost a year) and now after someone touched my computer we had to
    install everything again that is the only diference...........


    "Ivan Raiminius" wrote:

    > Hi Ana,
    >
    > no, you don't need to set reference with late binding.
    > You need to "dim fs as object" first
    >
    > Or you can set reference to "Microsoft Scripting Runtime" (early
    > binding), and code like this:
    > dim fs as scripting.filesystemobject
    > set fs=new scripting.filesystemobject
    >
    > Regards,
    > Ivan
    >
    >


  3. #3
    Ivan Raiminius
    Guest

    Re: problem with code

    Hi,

    if you add
    dim fs as scripting.filesystemobject
    you should also set the reference to "Microsoft Scripting Runtime".

    When your original code stops, what is the error message?

    Regards,
    Ivan


  4. #4
    Ana
    Guest

    Re: problem with code

    it was that the missing reference to "Microsoft Scripting Runtime".
    thank you

    Ana

    Ivan Raiminius" wrote:

    > Hi,
    >
    > if you add
    > dim fs as scripting.filesystemobject
    > you should also set the reference to "Microsoft Scripting Runtime".
    >
    > When your original code stops, what is the error message?
    >
    > Regards,
    > Ivan
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1