Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, thanks in advance for your help.
I need to finish a macro that opens "get external data"/"import data"/ and then places the website typed into the 'myinput' field into the field box. The website has different pages for the same type data. http://www.website.org/app.php?page=...about&id=99999 I know it's something regarding that "FINDER: @@@" statement. Here's where i'm at: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 6/21/2007 by me ' Dim Website Website = InputBox("Enter the Address of the site") ' Range("C117").Select ActiveWindow.SmallScroll Down:=-3 ActiveWindow.LargeScroll Down:=-3 Range("A1").Select Sheets("Sheet2").Select ActiveWorkbook.Worksheets.Add With ActiveSheet.QueryTables.Add(Connection:= _ "FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999", _ Destination:=Range("A1")) .Name = "app.php?page=businesses&action=about&id=99999 " .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .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 End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANK YOU DON! with a few changes it worked, thanks!!!!!!
"Don Guillett" wrote: IF??? you are trying to change the url, use a variable Sub GetUrl() Website = InputBox("Enter the Address of the site") 'assuming answer is 99999 you would get 'http://www.website.org/app.php?page=businesses&action=about&id=99999 murl="http://www.website.org/app.php?page=businesses&action=about&id="& website ActiveWorkbook.Worksheets.Add With ActiveSheet..QueryTables.Add( _ Connection:="URL;" & myurl, Destination:=.Cells(1, 1)) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With end sub If not, you may change url strings "http://www.website"&xxxxxxxxxx&"bbbbbbbb" -- Don Guillett SalesAid Software "HP" wrote in message ... Hello, thanks in advance for your help. I need to finish a macro that opens "get external data"/"import data"/ and then places the website typed into the 'myinput' field into the field box. The website has different pages for the same type data. http://www.website.org/app.php?page=...about&id=99999 I know it's something regarding that "FINDER: @@@" statement. Here's where i'm at: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 6/21/2007 by me ' Dim Website Website = InputBox("Enter the Address of the site") ' Range("C117").Select ActiveWindow.SmallScroll Down:=-3 ActiveWindow.LargeScroll Down:=-3 Range("A1").Select Sheets("Sheet2").Select ActiveWorkbook.Worksheets.Add With ActiveSheet.QueryTables.Add(Connection:= _ "FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999", _ Destination:=Range("A1")) .Name = "app.php?page=businesses&action=about&id=99999 " .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .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 End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Glad to help. Always nice to publish your final result for archival purposes -- Don Guillett SalesAid Software "HP" wrote in message ... THANK YOU DON! with a few changes it worked, thanks!!!!!! "Don Guillett" wrote: IF??? you are trying to change the url, use a variable Sub GetUrl() Website = InputBox("Enter the Address of the site") 'assuming answer is 99999 you would get 'http://www.website.org/app.php?page=businesses&action=about&id=99999 murl="http://www.website.org/app.php?page=businesses&action=about&id="& website ActiveWorkbook.Worksheets.Add With ActiveSheet..QueryTables.Add( _ Connection:="URL;" & myurl, Destination:=.Cells(1, 1)) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With end sub If not, you may change url strings "http://www.website"&xxxxxxxxxx&"bbbbbbbb" -- Don Guillett SalesAid Software "HP" wrote in message ... Hello, thanks in advance for your help. I need to finish a macro that opens "get external data"/"import data"/ and then places the website typed into the 'myinput' field into the field box. The website has different pages for the same type data. http://www.website.org/app.php?page=...about&id=99999 I know it's something regarding that "FINDER: @@@" statement. Here's where i'm at: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 6/21/2007 by me ' Dim Website Website = InputBox("Enter the Address of the site") ' Range("C117").Select ActiveWindow.SmallScroll Down:=-3 ActiveWindow.LargeScroll Down:=-3 Range("A1").Select Sheets("Sheet2").Select ActiveWorkbook.Worksheets.Add With ActiveSheet.QueryTables.Add(Connection:= _ "FINDER;http://www.website.org/app.php?page=businesses&action=about&id=99999", _ Destination:=Range("A1")) .Name = "app.php?page=businesses&action=about&id=99999 " .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .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 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
grabbing data from another website | Excel Discussion (Misc queries) | |||
How to extract one data from a website | Excel Discussion (Misc queries) | |||
Import data from a website to excel | Excel Worksheet Functions | |||
Copy Data from Website | Excel Programming | |||
Download data from website | Excel Programming |