Hi Chris:

Below is an Excel VBA Macro that will do what you are trying to do. 
This works much like the script that was suggested, I like the VBA 
macro because I usally am using my scan in a spreadsheet. If you need 
more help on this let me know.

Dale

Sub dailyGetDailyFile()
    Dim Daily As Worksheet
    Dim SPX As Boolean
    Dim DIA As Boolean
    Dim Loops As Integer
    Dim LastRow As Integer
    Dim Filename As String
    
    'Run your scan -
    Shell ("C:\Program Files\Quotes Plus\qp_rpts YourIndex.rpf")
    
    ' The message box is not displayed until the scan is completed, if 
you omit this
    ' you may need to add a wait to the program
    
    MsgBox ("Press Enter to continue")
    
    ' Open your file saved by your scan
    Workbooks.Open Filename:="C:\Stocks\YourIndex.csv"
    ActiveSheet.Move Before:=ThisWorkbook.Sheets(1)
    Set Daily = ActiveSheet
    
    'This determines the number lines returned by your scan
    LastRow = Daily.Cells(Rows.Count, "A").End(xlUp).Row
    
    For Loops = 1 To LastRow
        Select Case Daily.Cells(Loops, 1)
            Case "!SPX "
                SPX = True
            Case "DIA"
                DIA = True
            'Place as many Case Symbols here as needed
        End Select
    Next
    'Place as many  Symbols here as needed
    If SPX = False Then Daily.Cells(LastRow + 1, 1) = "!SPX": LastRow = 
LastRow + 1
    If DIA = False Then Daily.Cells(LastRow + 1, 1) = "DIA": LastRow = 
LastRow + 1
    'This will save your scan as lst
    Filename = "C:\Quotes Plus Data\Lists\" & Format(Now, "MM-DD-YY") 
& ".lst"
    ActiveWorkbook.SaveAs Filename:=Filename, FileFormat:=xlCSV
    'Run your next scan- be sure you have setup the report file
    Shell ("C:\Program Files\Quotes Plus\qp_rpts Scan2.rpf")
End Sub
--- In [email protected], "yeehoha" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I would like to have a couple of scans always add a few specific
> symbols to the output, even if they aren't generated from a scan 
algorthm.
> I've tried appending a line like
>  or if symbol= !spx then ...
> to the end of a logical scan, so that I'd always get a list that
> includes the spx, but this seems not to work (even if the symbol is in
> quotes.
> 
> Any ideas?
> 
> Thanks,
> Chris
>


Reply via email to