LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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
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
import XML data...Is there a size limit on the import? MatthewG Excel Discussion (Misc queries) 0 February 10th 09 05:57 PM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Import Macro in PERSONAL.XLS will not import to my main document mike Excel Programming 8 October 31st 07 09:24 PM
PLEASE!! How can I un-grey the 'Data-Import External Data-Import Data' option ??? kirkm[_6_] Excel Programming 13 August 8th 06 10:01 AM
I can import Access Tables. But, I can't import Access queries nickg420[_8_] Excel Programming 0 August 5th 04 07:46 PM


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