Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: JonoBBPosted on 2004-11-08 at 01:02:40ID: 12521622
This should work.
com/q/mh?s =" & strShareCode
ect e
ert ert
d(Connecti on:= _ mns = True sOne = True = False
Your question is pretty vague about how the 10 different stock prices are input, so this will only work for one stock price.
'Setup worksheet
Dim strShareCode as String
Dim strURL as String
'Get the share price into the string
Sheets("Ratings").select
strShareCode = Range("E5")
strShareUrl = "URL;http://finance.yahoo.
Dim strSharePrice as String
Sheets("majorholders").Sel
Cells.Select
Selection.clear
Selection.QueryTable.Delet
' Range("A:A,B:B").Select
' Range("B1").Activate
' Selection.Delete Shift:=xlToLeft
' Range("A1").Select
' Selection.EntireColumn.Ins
' Selection.EntireColumn.Ins
Range("A1").Select
'
With ActiveSheet.QueryTables.Ad
strShareUrl, Destination:=Range("A1"))
.Name = "mh?s=" & strShareCode
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "yfncsumtab"
' .WebTables = "25"
.WebPreFormattedTextToColu
.WebConsecutiveDelimitersA
.WebSingleBlockTextImport = False
.WebDisableDateRecognition
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub