Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web Import
I am trying to do a simple web, from a password-protected site:
This is the link: http://www.countrybobsdemo.com/administrator/ Temporary Username = Ryan and temporary password = ryan123 (case sensitive). I recorded a simple macro: Sub Macro1() Cells.Select Selection.ClearContents If QueryTable = True Then Selection.QueryTable.Delete Else Range("A1").Select With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.countrybobsdemo.com/administrator/index.php?option=com_rsform&task=submissions.manag e&formId=*" _ , Destination:=Range("A1")) .Name = "administrator/index.php?option=*" .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 = "3" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With End If Range("C:C,A:A").Select Range("A1").Activate Selection.Delete Shift:=xlToLeft Range("A1").Select End Sub I log into the web site first and run the code next. The code works fine the first time it is run, but doesn't work any subsequent times. i believe it has something to do with this line: ..Name = "administrator/index.php?option=*" I'm not sure what to change on there to make it more 'generic'. I tried the astrix symbol, but no luck with that. Any ideas how to modify that line code? Thanks so much, Ryan--- -- RyGuy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
import XML data...Is there a size limit on the import? | Excel Discussion (Misc queries) | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
Import Macro in PERSONAL.XLS will not import to my main document | Excel Programming | |||
PLEASE!! How can I un-grey the 'Data-Import External Data-Import Data' option ??? | Excel Programming | |||
I can import Access Tables. But, I can't import Access queries | Excel Programming |