Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 15-04-2011
Join Date: Apr 2011
Posts: 1
Excel 2003 Macro doesn't work in Excel 2007

I?m using Windows 7 and I used a macro which worked totally fine under Excel 2003. Now, under Excel 2007 it does not run anymore but displays the following error message:

"Run-time error '445':
Object doesn't support this action.

The function of the macro is to open up all other Excel spreadsheets located in the same folder and copy data out of them into the spreadsheet in which the macro is stored.

When I click on "Debug" the Visual Basic Editor highlights the row which says: Set FilSrch = Application.FileSearch

Can you help me with this? I've searched for a solution for a long time but could not find anything which worked.

The following is the start of the macro code:

'MsgBox "This function not available in this version.", vbInformation, "Function Not Available"
'Exit Sub
'Sheets("LookUp").[a12] = Now
With Application
.ScreenUpdating = False
.StatusBar = "Counting source files ..."
End With
Set FilSrch = Application.FileSearchWith FilSrch
.LookIn = ActiveWorkbook.Path
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
ReDim MyFilArray(.FoundFiles.Count)
For I = 1 To .FoundFiles.Count
If .FoundFiles(I) <> ActiveWorkbook.Path & "\" & ActiveWorkbook.Name Then
MyFilArray(I) = .FoundFiles(I)
End If
Next I
MsgBox "There were no files found."
End If
End With
Reply With Quote
Old 16-04-2011
Join Date: Jan 2006
Posts: 605
Re: Excel 2003 Macro doesn't work in Excel 2007

I think that Filesearch method is not available in Excel 2007. There is a FileSearch class that you can add to your project. Instead of using Application.FileSearch, you reference FileSearch instead or you can also use VBScript. Hope that helps you out.
Reply With Quote
Old 03-01-2014
Join Date: Jul 2011
Posts: 632
Re: Excel 2003 Macro doesn't work in Excel 2007

You can first try converting the Excel 2003 Macro to Excel 2007 and then try to run it. This might work. For that first you will have to open the file in Excel 2007 and save it in latest format. In Excel 2007 click on Office button and then click on Excel Option. Go to Trust Center > Trust Center Settings and in that click on Macro Settings. Disable All Macros with Notification. And then select Enable All Macros. Try again to open the files and see what output you are getting.
Reply With Quote
Old 03-01-2014
Join Date: Aug 2011
Posts: 578
Re: Excel 2003 Macro doesn't work in Excel 2007

If you want to run old Macro then the first thing you have to do is save the file in Excel 97-2003 format. And then save the Macro with it. Both the version of Office suite use Visual Basic and it will work. The second thing you can do is first export the Macro from VB Editor. Then in your new file import them and test back. This will surely work. If still there is a issue then you have to try to export the file again properly. Verify the Macro is working by running it once in Excel 2003.
Reply With Quote

  TechArena Community > Software > Windows Software
Tags: , , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Excel 2003 Macro doesn't work in Excel 2007"
Thread Thread Starter Forum Replies Last Post
Looking for a Excel Macro to delete rows which doesn?t contain a value in particular cell Antariksh Windows Software 6 23-07-2011 01:05 AM
How to Run Excel 2003 Macros in Excel 2007 Ekanga Windows Software 5 19-07-2010 02:37 PM
Excel 2007 macro help needed AZUL Software Development 4 19-11-2009 06:10 PM
Macro sum problem in excel 2007 Radley Windows Software 2 07-04-2009 09:46 PM
Excel 2003 VBA to Excel 2007 VBA help needed. JasonM Windows Software 3 29-01-2009 11:51 PM

All times are GMT +5.5. The time now is 01:31 AM.