Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
vovlov
 
Posts: n/a
Default Paste string on a cell to New Web Query URL


Hi!

I want to be able to copy an URL address to the New Web Query address
bar, by editing this macro:

---------------------------------
With ActiveSheet.QueryTables.Add(Connection:= _
_-\"URL;http://finance.yahoo.com/q?s=SSL\"-_,
Destination:=Range("H15"))
.Name = "q?s=SSL_7"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "15"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
--------------

I want to be able to change the URL according to a string on a cell...


--
vovlov
------------------------------------------------------------------------
vovlov's Profile: http://www.excelforum.com/member.php...o&userid=34596
View this thread: http://www.excelforum.com/showthread...hreadid=543901

  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Paste string on a cell to New Web Query URL

I assume you want to change the symbol? You can use this idea where cell a1
contains SSL

With ActiveSheet.QueryTables.Add(Connection:= _
_-\"URL;http://finance.yahoo.com/q?s=SSL\"-_,


With ActiveSheet.QueryTables.Add(Connection:= _
_-\"URL;http://finance.yahoo.com/q?s=" & [a1] & "\"-_,

Also, you probably?? only need a few parameters

..BackgroundQuery = True
..TablesOnlyFromHTML = False
..Refresh BackgroundQuery:=False
..SaveData = True


Be aware that doing it the way you are will build a new defined name with
each trip to the site so you will need to incorporate something like. If
other named cell, exclude them.

For Each Name In Sheets("Data").Names
Name.Delete
Next Name


Goto this web site and get some of the free files there such as my
YahooMultipleQuotes 'to get many at once
Look for mine under author donalb36
To visit your group on the web, go to:
http://groups.yahoo.com/group/xltraders/


--
Don Guillett
SalesAid Software

"vovlov" wrote in
message ...

Hi!

I want to be able to copy an URL address to the New Web Query address
bar, by editing this macro:

---------------------------------
With ActiveSheet.QueryTables.Add(Connection:= _
_-\"URL;http://finance.yahoo.com/q?s=SSL\"-_,
Destination:=Range("H15"))
Name = "q?s=SSL_7"
FieldNames = True
RowNumbers = False
FillAdjacentFormulas = False
PreserveFormatting = True
RefreshOnFileOpen = False
BackgroundQuery = True
RefreshStyle = xlInsertDeleteCells
SavePassword = False
SaveData = True
AdjustColumnWidth = True
RefreshPeriod = 0
WebSelectionType = xlSpecifiedTables
WebFormatting = xlWebFormattingNone
WebTables = "15"
WebPreFormattedTextToColumns = True
WebConsecutiveDelimitersAsOne = True
WebSingleBlockTextImport = False
WebDisableDateRecognition = False
WebDisableRedirections = False
Refresh BackgroundQuery:=False
End With
--------------

I want to be able to change the URL according to a string on a cell...


--
vovlov
------------------------------------------------------------------------
vovlov's Profile:
http://www.excelforum.com/member.php...o&userid=34596
View this thread: http://www.excelforum.com/showthread...hreadid=543901



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Text from cell to paste on New Web Query vovlov Excel Discussion (Misc queries) 0 May 19th 06 01:21 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
substitute the filename in a cell reference with a string in another cell. flummi Excel Discussion (Misc queries) 11 February 22nd 06 01:14 PM
dynamic cell reference within a text string gvm Excel Worksheet Functions 4 July 25th 05 02:40 AM
copy paste cell character limit Fred Excel Discussion (Misc queries) 1 December 2nd 04 08:58 PM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"