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

  • Thread starter Thread starter wpiet
  • Start date Start date
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?
 
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)
 
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)
 
Back
Top