Can I the find last used row from a closed workbook?

MPW

Well-known Member
Joined
Oct 7, 2009
Messages
537
Office Version
  1. 365
Platform
  1. Windows
I have over 1,100 old workbooks with macros. They are all built from a template, but vary in how many rows they contain.

In essence, I would like to duplicate the worksheet data (without the VBA code gumming up the works). Turning them into simple workbooks with no vba.
I tried doing this by looping/opening each workbook, but it is extremely slow and some of the vba has been corrupted so they only open manually.

I think I can use "ExecuteExcel4Macro" to accomplish this, even though I have never used it before, but I need to reset the range for each workbook.

So, without opening each workbook
1. I would like to find the last used row
2. Create and duplicate the values on the worksheet.
3. Any tips on using ExecuteExcel4Macro would also be welcomed. I know that this was used when the world was young, but unless there is a better method I will go with it.

Thanks
 

MPW

Well-known Member
Joined
Oct 7, 2009
Messages
537
Office Version
  1. 365
Platform
  1. Windows
Thank you once again Yongle. This worked really well once I got my brain out of the way;)
Just had to remove some of the unneeded items and move a few columns around.

This is by far easier than anything I might have come up with. Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,977
Office Version
  1. 365
Platform
  1. Windows
Glad that the suggestions proved helpful 👍
 

Watch MrExcel Video

Forum statistics

Threads
1,129,394
Messages
5,636,050
Members
416,894
Latest member
Hari1992

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
Top