PC Review


Reply
Thread Tools Rate Thread

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

 
 
wpiet
Guest
Posts: n/a
 
      18th Feb 2009
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?
--
Will
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      18th Feb 2009
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)

On Wed, 18 Feb 2009 13:42:02 -0800, wpiet
<(E-Mail Removed)> wrote:

>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?

 
Reply With Quote
 
wpiet
Guest
Posts: n/a
 
      19th Feb 2009
Thanks again, Chip.
--
Will


"Chip Pearson" wrote:

> 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)
>
> On Wed, 18 Feb 2009 13:42:02 -0800, wpiet
> <(E-Mail Removed)> wrote:
>
> >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?

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro To Change Which Macro Assigned To Command Button CVinje Microsoft Excel Misc 0 25th May 2010 09:55 PM
Re: Macro assigned to a button Don Guillett Microsoft Excel Misc 9 8th Dec 2006 11:16 PM
Macro Assigned to a Button =?Utf-8?B?emVwaHly?= Microsoft Excel Misc 1 25th Oct 2006 03:33 PM
How do I know what macro is assigned to a button? =?Utf-8?B?RGVuaXNlIGluIE5D?= Microsoft Excel Misc 3 3rd Apr 2006 02:31 PM
Which Macro Is Assigned to a Button SidBord Microsoft Excel Programming 3 29th Apr 2004 07:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:27 AM.