Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Desktop shortcut to last file that was opened

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Desktop shortcut to last file that was opened

How did you do this in MSWord? I would have guessed that there wasn't a way.

=====
This may work for you in excel.

It doesn't open the last file that you were working on--but it will open the
first file in the Most Recently Used File list (if you have that turned on).

I'd create a new workbook and put this code in a general module:

Option Explicit
Sub auto_Open()
Dim wkbk As Workbook

Set wkbk = Nothing
On Error Resume Next
Set wkbk = Workbooks.Open(Filename:=Application.RecentFiles(1 ).Path)
On Error GoTo 0

If wkbk Is Nothing Then
MsgBox "Most Recently used file not opened!"
End If

'uncomment this when you're sure it's working ok
'ThisWorkbook.Close savechanges:=False

End Sub

Then put a short cut to this "helper" workbook on your desktop.


If the file has been deleted/renamed/moved, then this will fail.

If you don't have (xl2003's menu):
Tools|Options|General tab|Recently Used File list
turned on, then it will fail.


Dart wrote:

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 663
Default Desktop shortcut to last file that was opened

Hi,

You can try the other way too.

Add an open file to the Favorites folder

You can add an open file to the Favorites folder so that you can easily
reopen it later. You must save the file before performing this procedure.

1. If the Web toolbar (toolbar: A bar with buttons and options that you use
to carry out commands. To display a toolbar, click Customize on the Tools
menu, and then click the Toolbars tab.) is not displayed, point to Toolbars
on the View menu, and then click Web.

2. On the Web toolbar, click Favorites, and then click Add to Favorites.
3. Click Add.

Challa Prabhu



"Dart" wrote:

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Desktop shortcut to last file that was opened

For MSWord shortcut:

Create a desktop shortcut for Winword.exe; open the properties and in the
Target bar go to the end of the file path leave a space then type /mFile1.
Now when you click on the shortcut it will open the last document you had
open.

Thanks, and I'll try your code.

"Dart" wrote:

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Desktop shortcut to last file that was opened

Thank you

"challa prabhu" wrote:

Hi,

You can try the other way too.

Add an open file to the Favorites folder

You can add an open file to the Favorites folder so that you can easily
reopen it later. You must save the file before performing this procedure.

1. If the Web toolbar (toolbar: A bar with buttons and options that you use
to carry out commands. To display a toolbar, click Customize on the Tools
menu, and then click the Toolbars tab.) is not displayed, point to Toolbars
on the View menu, and then click Web.

2. On the Web toolbar, click Favorites, and then click Add to Favorites.
3. Click Add.

Challa Prabhu



"Dart" wrote:

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Desktop shortcut to last file that was opened

I looked at the help in MSWord (2003) for "customize how word starts".

It says this:
/m
Start Word without running any AutoExec macros.

/mmacroname
Start Word and then run a specific macro. The /m switch also prevents Word from
running any AutoExec macros.

Example: /mSalelead

So it kind of looks like you have a macro (in normal.dot????) that runs when you
use that shortcut. You may want to look at that macro to see if it can be
converted to excel (or if it's close to the suggested code).



Dart wrote:

For MSWord shortcut:

Create a desktop shortcut for Winword.exe; open the properties and in the
Target bar go to the end of the file path leave a space then type /mFile1.
Now when you click on the shortcut it will open the last document you had
open.

Thanks, and I'll try your code.

"Dart" wrote:

I'm trying to find a way to create a desktop shortcut that will open the last
Excel file I was working on. I have a one for Word but have not been able to
create one for Excel. Does anyone have any suggestions


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel 2007, how can you create a desktop shortcut for a file? Mark 246 Excel Discussion (Misc queries) 6 June 25th 07 08:05 PM
Excel adds a "1" to filenames opened from desktop shortcut skibeaux Excel Discussion (Misc queries) 4 June 20th 07 09:05 PM
Desktop Shortcut Tom New Users to Excel 1 October 23rd 06 01:00 AM
Sending a shortcut to the desktop Paul Excel Discussion (Misc queries) 1 February 21st 05 08:06 PM
Desktop shortcut to a named Excel file - every time I open it adds a "1" to the file name - how to disable? [email protected] Setting up and Configuration of Excel 2 November 27th 04 09:02 PM


All times are GMT +1. The time now is 08:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"