Thanks a lot.
Works very well!
Is possible to make some enhancements?
I want to have different sheets with different DDE streaming data.
I have a different files each one with a list of symbols.
I want excel read the symbols and stream for each file I have in a different sheet.
I.e. This is the file1
-----------------
SYM1
SYM2
-----------------
This is the file2
---------------
SYM3
SYM4
------------
Ok.
I want in Sheet1 :
the stream of =TOS|VOLUME!'SYM1' and
=TOS|VOLUME!'SYM2'
in Sheet2 :
The stream of =TOS|VOLUME!'SYM3' and =TOS|VOLUME!'SYM4'
*********************
The I have the suggested routine:
--------------------------
Private Sub SaveCopies()
Dim SaveTo As String
SaveTo = "\\ServerName\Path\FileName " & CStr(Format(Now, "dd MMM yyyy HH mm ss")) & ".xls"
ThisWorkbook.SaveAs Filename:=SaveTo
Application.OnTime Now + TimeValue("00:00:20"), "SaveCopies"
End Sub
----------------------
Is possible to save data from each Sheet in different Files?
(using i.e. a Master macro that call childern macro each for each streaming sheet) ?
Thanks
Code:
Option Explicit
Private Sub SaveCopies()
Dim SaveTo As String
SaveTo = "\\ServerName\Path\FileName " & CStr(Format(Now, "dd MMM yyyy HH mm ss")) & ".xls"
ThisWorkbook.SaveAs Filename:=SaveTo
Application.OnTime Now + TimeValue("00:00:20"), "SaveCopies"
End Sub
Change \\ServerName\Path\FileName to the location where you want to save the workbook. Also change the 20 number to the number of seconds you want it to loop and save.