Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2014, 12:52 PM
charlesdh charlesdh is offline Is there a solution to change the recentfilelist programmatically Windows 7 32bit Is there a solution to change the recentfilelist programmatically Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

Try tis bit of code in the "Thisworksheet" module.
When the user close the workbook it should be save to the specified drive.
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    
     Application.DisplayAlerts = False
    ActiveWorkbook.Save Filename:="C:\Users\laura\Documents\Excel\ExcelFiles\David.xlsm"
    Application.DisplayAlerts = True
    ActiveWorkbook.Close
End Sub

Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a solution to change the recentfilelist programmatically Creating Event Handlers Programmatically pluviosilla Word VBA 4 11-06-2014 05:36 PM
Is there a solution to change the recentfilelist programmatically Adding macro to normal.dotm programmatically etippelt Word VBA 6 04-08-2013 05:55 PM
Programmatically convert Office documents to PDF from C# hemaneelagiri Office 0 10-21-2011 06:07 AM
outlook programmatically read an attachment into byte array chriskaza81 Outlook 0 11-19-2010 01:03 AM
Programmatically changing folder item selection Richard Cook Outlook 0 02-09-2007 02:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft