Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2016, 04:21 PM
Registered User
 
Join Date: Sep 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel Office 365 File Save As Script

I have an XLS File sitting on a workstation, the spreadsheet is always open, and is autorefreshing every few minutes and pulling data out of Sage MAS 200 ERP via a query using an ODBC Connection

I need to pass this data to another program every few minutes, and the other program only accepts CSV Files.

So all i need really is a script that will take my XLS File and do a Save as CSV with same file name in same location on a timer.

I see that Excel has an autorecovery type save feature, but no more auto save that overwrites the old copy, which is what i need.

Thanks in advance for help.
 
Old September 20th, 2016, 05:25 PM
Registered User
 
Join Date: Sep 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just found another post that answered my question. I now have the spreadsheet autosaving every 4 minutes and overwriting the existing file. Couldnt be happier. I dont know much code, but I sure do love it when a project like this comes together.

Module1:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "AutoSaveAs", , False
End Sub

Private Sub Workbook_Open()
dTime = Time + TimeValue("00:04:00")
Application.OnTime dTime, "AutoSaveAs"
End Sub


Module 2
Sub AutoSaveAs()
dTime = Time + TimeValue("00:04:00")
With Application
.OnTime dTime, "AutoSaveAs"
.EnableEvents = False
.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\yourdirectory\filename"
.EnableEvents = True
End With
End Sub
 
Old November 26th, 2016, 07:43 AM
Registered User
 
Join Date: Nov 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Microsoft Excel Password recovery tool is the best solution that given you instant recovery excel password and open excel password correctly. It can allow you to crack excel file password and recover ms excel password with all version of ms excel file. Solution smart for removing excel file password without any harm
Read More:
http://www.excelfilepasswordrecovery.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
sharepoint and office 365 christophernugen SharePoint Development 0 August 6th, 2015 10:02 AM
Excel auto export .dbf file through VBA - OFFICE 2013 woes Drivium Excel VBA 0 July 25th, 2013 10:57 AM
Office 365 how to upload app? [email protected] BOOK: Beginning SharePoint 2013 Development 2 July 8th, 2013 12:24 PM
Internet Explorer Prompts User to Open/Save Office File Khalil ASP.NET 4 General Discussion 0 January 28th, 2012 06:32 PM
Save Excel file. dpkbahuguna ASP.NET 2.0 Basics 1 March 10th, 2007 07:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.