[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LeBarre Stock Price - VBA code to XL



PureBytes Links

Trading Reference Links

Hi Don

Your program works very well.

For those who wrote about a VBA routine to get the data into XL:

This sub will open as many files as you want into XL charting programs.
Change paths to suit your own folders and drives.

Best regards

Walter

================

Sub ImportTextFile1()
     Dim myFile As Variant
     Dim i As Variant

     ChDir "G:\LeBarre StockPrices Program"
     myFile = Application.GetOpenFilename("Text Files,*.txt",
MultiSelect:=True)
     If IsArray(myFile) Then
     For i = LBound(myFile) To UBound(myFile)
      Workbooks.OpenText _
         Filename:=myFile(i), _
         Origin:=xlWindows, _
         StartRow:=1, _
         DataType:=xlDelimited, _
         TextQualifier:=xlDoubleQuote, _
         ConsecutiveDelimiter:=False, _
         Tab:=False, _
         Semicolon:=False, _
         Comma:=True, _
         Space:=False, _
         Other:=False, _
         FieldInfo:=Array(Array(1, 1), _
         Array(2, 1), Array(3, 1), _
         Array(4, 1), Array(5, 1), _
         Array(6, 1), Array(7, 1), Array(8, 1))

       ActiveSheet.Move _
         Before:=Workbooks("XXXXXX_Charting.xls").Sheets(2)
     Next i
     Else
       MsgBox "You hit cancel"
     End If
 End Sub


----- Original Message -----
From: "Walter Lake" <wlake@xxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Thursday, September 28, 2000 1:43 PM
Subject: Re: LeBarre Stock Price exe


| Hi Don
|
| Sorry to be so dense. I had gone to your web site earlier without success.
| http://www.u2ecom.com/StockPrices.htm
|
| It's all there ... I should have looked again.
|
| Thanks again for your time
|
| Walter
|
| ----- Original Message -----
| From: "Walter Lake" <wlake@xxxxxxxxx>
| To: <metastock@xxxxxxxxxxxxx>
| Sent: Thursday, September 28, 2000 6:36 AM
| Subject: LeBarre Stock Price exe
|
|
| | Hi Don
| |
| | On installation, your stock price exe asked for a Login and Password ??
| |
| | What are the valid codes? Is there any cost for these codes?
| |
| | There doesn't appear to be any type of "ReadMe" text file that provides
| | instructions or indicates what you want done.
| |
| | Thanks for your time in sending me your program.
| |
| | Best regards
| |
| | Walter
| |
| | ----- Original Message -----
| | From: "Walter Lake" <wlake@xxxxxxxxx>
| | To: <metastock@xxxxxxxxxxxxx>
| | Sent: Sunday, September 24, 2000 5:28 PM
| | Subject: Re: getting Yahoo data
| |
| |
| | | Hi Don
| | |
| | | I was looking forward to you posting your 2MB VB Yahoo downloader on
| your
| | | web site as promised earlier. If you are not going to post it as
| promised,
| | | would you please send me a copy.
| | |
| | | ----- Original Message -----
| | | From: "Don LaBarre" <dllabarre@xxxxxxxxxxx>
| | | To: <metastock@xxxxxxxxxxxxx>
| | | Sent: Sunday, September 24, 2000 3:51 PM
| | | Subject: Re: getting Yahoo data
| | |
| | |
| | | | I use Yahoo data but retrieve it with a VB program that stores the
| | prices
| | | in
| | | | an ASCII text file that MS Downloader can read and load into MS.
| | | | The VB program can retrieve multiple ticker symbols and multiple
days
| at
| | | | once.
| | | |
| | | | If interested write me privately.
| | | |
| | | | Don LaBarre
| | | | Web Developer
| | | | Visual Basic Programmer
| | | | www.u2ecom.com
| | | | www.cedarcreektrading.com
| | | | www.auto607.com
| | | | www.conklinplayers.com
| | | |
| |
| |
|