Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() First of all apologies for the title not sure how to reference this. I have a table which contains a username and id number. For each username I have a sheet with the same name. Here is a few records from the table Column A and Column B UNP-1ce 2168950611 UNP-ali169 111667564008 UNP-Bailey 111686165248 UNP-Bala420 27498979167 UNP-Blade 24241061987 I I am running a web query for each person where the difference in the URL is the id number Here is the code of the macro I use Sub Update_Player() Dim PlayerId As String Dim PlayerName As String PlayerId = "11801902765" PlayerName = "UNP-Maximus" With Worksheets(PlayerName).QueryTables.Add(Connection: ="URL;http://www.stupidhero.com/DFA/SigConfig.cfm?PlayerID=" & PlayerId & "" _ , Destination:=Sheets(PlayerName).Range("A2")) .Name = PlayerName .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlOverwriteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "13" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .Refresh BackgroundQuery:=False End With End Sub In theory I could replicate this macro over and over changing the name and code but this seems rather bad ![]() Is there anyway that I can get the macro to look at the contents of the sheet with the name and code in it run the macro against row 1 then row 2 until the end. Hopefully this makes sense, Thanks in advance Rob -- racer25 ------------------------------------------------------------------------ racer25's Profile: http://www.excelforum.com/member.php...o&userid=13057 View this thread: http://www.excelforum.com/showthread...hreadid=482189 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot table bottom ten filter with conditions | Excel Discussion (Misc queries) | |||
How do I move the Pivot Table totals from the bottom row to the t. | Excel Discussion (Misc queries) | |||
Place a Bottom Border in a Table via a Macro | Excel Discussion (Misc queries) | |||
how to add a formula at the bottom of a pivot table? | Excel Programming | |||
ranking the bottom of the table | Excel Programming |