Modified

Workbooks

  • Removed stock ‘txu’; It is not listed on yahoo and gives the internal VBA problems because nothing is returned in web query
    • FIXME Error testing needs to be added here; When a stock ticker is to be used, data returned (or lack of), should be tested for and acted on appropriately

Visual

  • Comment boxes enlarged so they can be fully read

Programmatic

  • FIXME Noticed that correct time outputs are not happening when user selects different than default
    • Many times, in the ‘ClosingPrices’ worksheet, there is only 25 rows of data, and the date at the top is incorrect
    • Is this another ‘per computer’ or ‘per yahoo webpage’ error?
  • In ‘Module1’, in ‘MainStockQuery’, commented out and added the following lines of code
    • This was used to see more of what was going on as the program executed.
    • '    Application.ScreenUpdating = False
          Application.ScreenUpdating = True
  • In ‘Module1’, in ‘FinishConsolidate’ changed comment referencing consolidated sheet to below. There is no sheet named consolidated. I think the author mixed it up with his function names.
    • ' This sub finishes setting up the ClosingPrices sheet.
  • In ‘Module1’, in ‘RunQuery’, commented a piece of code that was part of the process of creating a QueryTable. It never gave me problems before, but started giving me errors recently. Everything fine once I comment it out. Reference to it here http://msdn2.microsoft.com/en-us/library/aa176169(office.11).aspx
    • '.RefreshOnFileOpen = False  'from macro
    • FIXME not really sure what this does or doesn’t do
  • FIXME Error state: choose appl, goog, gs from 2/18/2000 to 2/18/2004 monthly
  • FIXME Stock Split, take into account? See Roy rada comment on this on blackboard. See it on ‘Query Sheet’ when running same example above

Added

Visual

  • On ‘frmDates’ form, added a Label for user interface improvement and error reduction. It informs the user that they have to select a day or it may provide undesired results.
    • Note: If you change the month, or year, be sure to also CHOOSE A DAY. It is not automatically selected and will result in a former month/year to be selected

Programmatic

  • In ‘FinishConsolidate’ added following code in order to make absolutely sure the correct worksheet is active. This was not formerly an error, but prevents future possible errors where the user adds code and then unknowingly has the incorrect active sheet.
    • '    Activate the ClosingPrices sheet.
          Worksheets("ClosingPrices").Activate
  • In ‘frmDates’, in ‘UserForm_Initialize’ added
    •     ' Sets form user-input defaults
  • In ‘Module1’, in ‘RunQuery’, changed code to allow for better handling of errors related to a temporary sheet not being deleted.
    •         Dim seekSheet As Worksheet
       
              ' Makes sure that the Query Sheet was deleted last time
              On Error Resume Next
              Set seekSheet = Sheets("QuerySheet")
              If Not seekSheet Is Nothing Then
                  Worksheets("QuerySheet").Delete
              End If
              
              ' Adds the temporary sheet, QuerySheet, which is used below to pull in the URL text
              Worksheets.Add
              ActiveSheet.Name = "QuerySheet"
  • In ‘Module1’ in ‘Consolidate’, needed to add code for error when stock didn’t exist during time frame shown, or returns no market data
    •     ' If cannot find the Adj Close column, put zeroes in columnc and, exit sub
          If AdjCloseCell Is Nothing Then
              ' put all 0's in column
              For counter = 1 To nPeriods
                  ' FIXME put 0 in cell
              Next
              MsgBox "A non-critical error has occured. One of the stocks you entered had no history to return, or yahoo is giving an unexpected format. Results may be incorrect.", vbCritical, "Warning!"
              foundNothing = True
              Exit Sub
          End If
    • Added
      Public nPeriods As Integer
      • Integer that tells how man time intervals exist; same as number of rows on closingPrices worksheet
 
personal/school/financialitsystems_is698/portfolio_management_albright_mods.txt · Last modified: 02.18.2008 16:25 by 74.66.236.199
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki