Sub BuildLimitUpDays() '-------------------------------- 'LimitUp! market file builder 'Copyright 1997 by Joe Gruberman '-------------------------------- 'This macro creates daily price information from an Excel spreadsheet. 'Market files can ONLY be built for the registered version of LimitUp!. ' 1)Record price information in a spreadsheet. ' . Col: A B C D E F ' (blank) date open high low close ' 2)Run this macro. ' . Enter the starting row of the data. ' . Enter the number of days of data. ' . A concatenated string is built in column A ' 3)Using an existing market file as a template, ' insert the market-specific information above ' the daily price info. ' 4)Select column A and copy it onto the clipboard. ' 5)Create a text file and paste from the clipboard. ' 6)Name the text file, using ".mkt" as the suffix. ' . For example, "gold1296.mkt" ' 7)As a final check, compare your newly created ' market file to an existing market file (*.mkt) ' and ensure that all key words (left of "=" sign) ' match, and that all variables (right of "=" sign) ' are correct for the market data you have created. '--------------------------------------------------------- r = InputBox("Day #1 starts in what ROW? (using columns A thru F)", "LimitUp! Market Builder", 1) If Val(r) = 0 Then Exit Sub l = InputBox("Total number of days (ROWS) of data?)", "LimitUp! Market Builder", 10) If Val(l) = 0 Then Exit Sub mmmtab = "JanFebMarAprMayJunJulAugSepOctNovDec" For i = 1 To l MyCell = "B" & Trim(Str(r)) Range(MyCell).Select mydate$ = Str(ActiveCell) mm = Month(mydate$) mmm$ = Mid(mmmtab, 3 * mm - 2, 3) dd$ = Trim(Str(Day(mydate$))) yyyy = Year(mydate$) yy$ = Right(Str(yyyy), 2) LUdate$ = dd$ & mmm$ & yy$ ' MyCell = "C" & Trim(Str(r)) Range(MyCell).Select LUopen$ = LTrim(Str(ActiveCell)) ' MyCell = "D" & Trim(Str(r)) Range(MyCell).Select LUhigh$ = LTrim(Str(ActiveCell)) ' MyCell = "E" & Trim(Str(r)) Range(MyCell).Select LUlow$ = LTrim(Str(ActiveCell)) ' MyCell = "F" & Trim(Str(r)) Range(MyCell).Select LUclose$ = LTrim(Str(ActiveCell)) ' MyCell = "A" & Trim(Str(r)) Range(MyCell).Select dayn$ = "day" & Trim(Str(i)) & "=" ' LUday$ = dayn$ & LUdate$ & "," & LUopen$ & "," & LUhigh$ & "," & LUlow$ & "," & LUclose$ ActiveCell = LUday$ r = r + 1 Next i lf$ = Chr(10) MsgBox "Be sure to insert market-specific information above these rows." & lf$ & lf$ & "Use an existing market (*.mkt) file as a template.", , "LimitUp! Market Builder" End Sub