Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Programming a macro to draw info from a list of links

Run-time error 450, Wrong number of arguments or invalid property assignment.



"Joel" wrote:

Sub URL_Get_Data()
celladdress = Cells(Rows.Count, "A").End(xlUp)(2).address
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & _
"Destination:=Sheets(""Links"").Range(" & celladdress & ")")

.BackgroundQuery = True
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.Refresh BackgroundQuery:=True
.SaveData = True
End With
End Sub




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Programming a macro to draw info from a list of links

Can you post the code that worked before you made modifications. Queries are
hard to debug unless you havve the actual database or webpage.

Usually I get Queries to work by recording a macro and then modifiying the
recorded macro as necessary.

"Snowman" wrote:

Run-time error 450, Wrong number of arguments or invalid property assignment.



"Joel" wrote:

Sub URL_Get_Data()
celladdress = Cells(Rows.Count, "A").End(xlUp)(2).address
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & _
"Destination:=Sheets(""Links"").Range(" & celladdress & ")")

.BackgroundQuery = True
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.Refresh BackgroundQuery:=True
.SaveData = True
End With
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Programming a macro to draw info from a list of links

I never had any that worked. I began with the sample from this article:

http://support.microsoft.com/kb/213730

"Joel" wrote:

Can you post the code that worked before you made modifications. Queries are
hard to debug unless you havve the actual database or webpage.

Usually I get Queries to work by recording a macro and then modifiying the
recorded macro as necessary.

"Snowman" wrote:

Run-time error 450, Wrong number of arguments or invalid property assignment.



"Joel" wrote:

Sub URL_Get_Data()
celladdress = Cells(Rows.Count, "A").End(xlUp)(2).address
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & _
"Destination:=Sheets(""Links"").Range(" & celladdress & ")")

.BackgroundQuery = True
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.Refresh BackgroundQuery:=True
.SaveData = True
End With
End Sub




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
macro to print files from a list of links jim9912 Excel Discussion (Misc queries) 7 April 25th 06 05:43 PM
EXCEL - LINKS cannot easily get list of all links & names in book Tuba Joe Excel Worksheet Functions 1 September 29th 05 10:33 PM
micro programming links maz Excel Programming 2 September 21st 05 05:59 AM
Macro to list info on seperate worksheet Oreg Excel Programming 1 May 10th 04 02:16 AM
Programming links Joe Bannister Excel Programming 1 July 10th 03 12:14 PM


All times are GMT +1. The time now is 12:59 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"