Macros in Excel 2007

JohnMjoco

New Member
Joined
May 29, 2008
Messages
3
I have used a macro in Excel 2003 that gathers all the file names in a directory, posts them to a worksheet, and coverts the list to hyperlinks. It uses shell32.dll and the exact code I can find in other posts on this forum.

It does not work in Excel 2007. I have changed my security settings and I do have macros running in the same workbooks that use only Excel functions. I have even coverted my personal.xls to personal.xlsm and hidden the personal.xls file. No luck at all.

I have regestered shell32.dll and it is used successfully by another program

Any suggestions?
 
Last edited:

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Does it use FileSearch? 2007 doesn't support it. Your code will compile so it's backward compatible, but that's all.
 
Upvote 0
After help in moving in the right direction, I have reached a conclusion. I cannot use my macro in Excel 2007 and the alternatives are more complex than I can handle. I have designated one of our older machines as the Office 2003 machine. I can run the macro on that machine and then open the files in Office 2007 and everything I need is available.

The process is a one time, end of cycle, function for us so this solution works for me. :confused:
 
Upvote 0
Sorry John for the delay. There are replacement macros that work for 2003 & 2007 - but you would have to get away from the FileSearch object.

If you do a search here for file search posts by NateO, you may find one you can adapt.
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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