View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ana Ana is offline
external usenet poster
 
Posts: 44
Default 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