AddToMru if .xls opened by button assigned to macro within it

W

wpiet

In Excel 2003, I have a workbook containing a macro that is assigned to a
button on the menu bar. The workbook is not open. Clicking the button opens
the workbook & runs the macro. The workbook does not show up on the Recent
Files list, since it was opened automatically. If I were opening it
programatically, I would use Workbooks.Open AddToMru:=True. Is there a way to
add it to the Recent Files list once it's already open?
 
C

Chip Pearson

Try

Application.RecentFiles.Add Name:=ThisWorkbook.FullName

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
W

wpiet

Thanks again, Chip.
--
Will


Chip Pearson said:
Try

Application.RecentFiles.Add Name:=ThisWorkbook.FullName

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top