Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Help on coding?

Refer to the post in Worksheet function.

Does anyone have any suggestion on how to do it in excel?

There is the format for the macro query.
qryConnect = "URL;http://www.myurl.com/filename.html"

There is a list of file names on column A under Lists worksheet.
Does anyone have any suggestions on how to retrieve the character on column
A under worksheet lists and insert into the query in order to do the
following tasks?

For example,
qryConnect = "URL;http://www.myurl.com/john.html"
qryConnect = "URL;http://www.myurl.com/1.html"

I would like to load a list of web links into Temp worksheet, after the
first link is loaded from cell A1 under Lists worksheet, then retrieve the
value in cell A10 under Temp worksheet and paste this value into B1 under
Lists worksheet. After that,

repeat for the next web links ...

after the second link is loaded from cell A2 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B2 under Lists worksheet.

repeat for the next web links ...

after the third link is loaded from cell A3 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B3 under Lists worksheet.

repeat for the next web links ...

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help on coding?

Below is code that was created using Record Macro while performing a web query.

Notice the items which are string (between double quotes)


"URL;http://www.myurl.com/search.php?uid=ws547d65f0b56a435.80901093&src="

you can add a variable to this string like the code below

MyVariable
"URL;http://www.myurl.com/search.php?uid=" & MyVariable & "="

Below is the recorded macro

With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.myurl.com/search.php?uid=ws547d65f0b56a435.80901093&src=", _
Destination:=Range("H24"))
.Name = "search.php?uid=ws547d65f0b56a435.80901093&src ="
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


"Eric" wrote:

Refer to the post in Worksheet function.

Does anyone have any suggestion on how to do it in excel?

There is the format for the macro query.
qryConnect = "URL;http://www.myurl.com/filename.html"

There is a list of file names on column A under Lists worksheet.
Does anyone have any suggestions on how to retrieve the character on column
A under worksheet lists and insert into the query in order to do the
following tasks?

For example,
qryConnect = "URL;http://www.myurl.com/john.html"
qryConnect = "URL;http://www.myurl.com/1.html"

I would like to load a list of web links into Temp worksheet, after the
first link is loaded from cell A1 under Lists worksheet, then retrieve the
value in cell A10 under Temp worksheet and paste this value into B1 under
Lists worksheet. After that,

repeat for the next web links ...

after the second link is loaded from cell A2 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B2 under Lists worksheet.

repeat for the next web links ...

after the third link is loaded from cell A3 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B3 under Lists worksheet.

repeat for the next web links ...

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default Help on coding?

Thank you for your suggestions
Could you please present the coding in macro coding format?
I cannot apply those code at this moment.
Thank you for any suggestions
Eric

"Joel" wrote:

Below is code that was created using Record Macro while performing a web query.

Notice the items which are string (between double quotes)


"URL;http://www.myurl.com/search.php?uid=ws547d65f0b56a435.80901093&src="

you can add a variable to this string like the code below

MyVariable
"URL;http://www.myurl.com/search.php?uid=" & MyVariable & "="

Below is the recorded macro

With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.myurl.com/search.php?uid=ws547d65f0b56a435.80901093&src=", _
Destination:=Range("H24"))
.Name = "search.php?uid=ws547d65f0b56a435.80901093&src ="
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


"Eric" wrote:

Refer to the post in Worksheet function.

Does anyone have any suggestion on how to do it in excel?

There is the format for the macro query.
qryConnect = "URL;http://www.myurl.com/filename.html"

There is a list of file names on column A under Lists worksheet.
Does anyone have any suggestions on how to retrieve the character on column
A under worksheet lists and insert into the query in order to do the
following tasks?

For example,
qryConnect = "URL;http://www.myurl.com/john.html"
qryConnect = "URL;http://www.myurl.com/1.html"

I would like to load a list of web links into Temp worksheet, after the
first link is loaded from cell A1 under Lists worksheet, then retrieve the
value in cell A10 under Temp worksheet and paste this value into B1 under
Lists worksheet. After that,

repeat for the next web links ...

after the second link is loaded from cell A2 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B2 under Lists worksheet.

repeat for the next web links ...

after the third link is loaded from cell A3 under Lists worksheet, then
retrieve the value in cell A10 under Temp worksheet and paste this value into
B3 under Lists worksheet.

repeat for the next web links ...

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

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
VB Coding johnsail Excel Discussion (Misc queries) 1 February 18th 10 12:54 PM
sum by coding without 0 kaja New Users to Excel 1 March 2nd 08 09:09 PM
coding maisy1 Excel Discussion (Misc queries) 1 August 6th 06 08:58 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM


All times are GMT +1. The time now is 11:34 AM.

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"