Moving macro from Excell 2003 to Excell 2010

JanoT

New Member
Joined
Jun 23, 2011
Messages
8
Hi,
my macro Excell 2003 starts:
.
.
Dim fso As New FileSystemObject
Set co = CreateObject("Scripting.FileSystemObject")
Set wf = Application.WorksheetFunction
Set fs = Application.FileSearch
.
.

I have tried run in Excell 2010 and there appeard error message:

Compile error:
Can´t find project or library.

Could somebody advice me?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Why do you want to create to FileSystemObject variables? To "Dim fso As New FileSystemObject" to work, you need to go here: Tools -> Reference -> Microsoft Scripting Runtime.
 
Upvote 0
Hi,
my macro Excell 2003 starts:
.
.
Dim fso As New FileSystemObject
Set co = CreateObject("Scripting.FileSystemObject")
Set wf = Application.WorksheetFunction
Set fs = Application.FileSearch
.
.

I have tried run in Excell 2010 and there appeard error message:

Compile error:
Can´t find project or library.

Problem is with code "Dim fso As New FileSystemObject".

Could somebody advice me?
 
Upvote 0
Application.Filesearch is not available in Excel 2007 or 2010. If you do a search of the board you should find some alternatives.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top