Как использовать MS Investor Ticker для показа частных новостей

Листинг 2

Private Sub CommandMake_Click()
Dim varFileName As Variant
Dim    objArea As Range
Dim objRight As Range
Dim objDown As Range
Dim objRightCell    As Range
Dim objDownCell As Range
Dim objCurrCell As Range

varFileName    = Application.GetSaveAsFilename( _
          InitialFilename:=”ticker”, _
             fileFilter:=”Text Files (*.txt), *.txt”)
If varFileName <> False Then
   Open    varFileName For Output As #1
   Print #1, “DATE=” & Format(Date, “mm/dd/yyyy”)
   Print    #1, “TIME=” & Format(Time, “hh:mm AM/PM”)
Else
   Exit Sub
End If
Set    objCurrCell = ActiveCell
Range(“NewsHeadCell”).Activate
Set objArea = ActiveCell.CurrentRegion
Set    objRight = objArea.Offset(0, 4).Resize(1, _
          objArea.Columns.Count    - 4)
Set objDown = objArea.Offset(1, 0).Resize(objArea.Rows.Count - 1, 1)
objDown.ClearContents
For    Each objRightCell In objRight
   For Each objDownCell In objDown
      If    Trim(objDownCell.Offset(0, _
       objRightCell.Column - 1).Value) <>    “” Then
         If (Now - objDownCell.Offset(0, 1).Value _
          -    Val(TextCount.Value)) <= 0 Then
            objDownCell.EntireRow.Select
            objDownCell.Value    = objDownCell.Value + 1
            Print #1,
            Print #1, “S=”    & objRightCell.Value
            Print #1, “U=” & “http://” _
                      & objDownCell.Offset(0, 3).Value
            Print #1, “H=” & objDownCell.Offset(0,    2).Value
            Print #1, “E”
         End If
      End If
   Next
Next
objCurrCell.Activate
ActiveCell.Select
Close    #1
MsgBox “File “ & varFileName & “ Brewed”, vbInformation
End Sub

Возврат

Наш канал на Youtube

1999 1 2 3 4 5 6 7 8 9 10 11 12
2000 1 2 3 4 5 6 7 8 9 10 11 12
2001 1 2 3 4 5 6 7 8 9 10 11 12
2002 1 2 3 4 5 6 7 8 9 10 11 12
2003 1 2 3 4 5 6 7 8 9 10 11 12
2004 1 2 3 4 5 6 7 8 9 10 11 12
2005 1 2 3 4 5 6 7 8 9 10 11 12
2006 1 2 3 4 5 6 7 8 9 10 11 12
2007 1 2 3 4 5 6 7 8 9 10 11 12
2008 1 2 3 4 5 6 7 8 9 10 11 12
2009 1 2 3 4 5 6 7 8 9 10 11 12
2010 1 2 3 4 5 6 7 8 9 10 11 12
2011 1 2 3 4 5 6 7 8 9 10 11 12
2012 1 2 3 4 5 6 7 8 9 10 11 12
2013 1 2 3 4 5 6 7 8 9 10 11 12
Популярные статьи
КомпьютерПресс использует