Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have in a code the following sentence: set fs=CreateObject("Scripting.filesystemobject") ..... before it was working fine in my macro but I had a problem with my computer and I had to install everything again and now this marcro sotps in this line , I think I have to include somthing in the references but I do not know what... any idea? thank you ana |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ana,
changes are that you do not need the fso at all. VBA has built in ways of achieving the majority of its functionality..and faster also. NickHK "Ana" wrote in message ... Hi, I have in a code the following sentence: set fs=CreateObject("Scripting.filesystemobject") ..... before it was working fine in my macro but I had a problem with my computer and I had to install everything again and now this marcro sotps in this line , I think I have to include somthing in the references but I do not know what... any idea? thank you ana |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That should read "Chances are..."
NickHK "NickHK" wrote in message ... Ana, changes are that you do not need the fso at all. VBA has built in ways of achieving the majority of its functionality..and faster also. NickHK "Ana" wrote in message ... Hi, I have in a code the following sentence: set fs=CreateObject("Scripting.filesystemobject") ..... before it was working fine in my macro but I had a problem with my computer and I had to install everything again and now this marcro sotps in this line , I think I have to include somthing in the references but I do not know what... any idea? thank you ana |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Alt Code Problem | Excel Discussion (Misc queries) | |||
Code problem | Excel Programming | |||
Code Problem | Excel Programming | |||
Code Problem | Excel Programming | |||
Problem with the following code | Excel Programming |