Thread: Web Import
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
[email protected] oitbso@yahoo.com is offline
external usenet poster
 
Posts: 18
Default Web Import

On Feb 23, 9:14*am, ryguy7272
wrote...snip...

This works perfectly fine if I clear all the data from the previous run, do
the import, clear, import, and so on. *However, it does not do the initial
import if I close the WB and reopen it. *I guess Excel can’t establish the
initial connection to the secured site! *If I record a macro during my login
steps, and copy/paste the web import under Ron’s original code, things are
fine. *Again, if I close the WB and open it, Excel doesn’t seem to know how
to find the web site. *I suspect this has something to do with the
login/security. *I’ve done web imports many times before without a problem,
but all prior experience is with non-secure web sites. *Ron, any other ideas
on how to establish a connection when the WB is opened? *Anyone?


Ryan...The macro is not coded to auto run upon workbook open. You
would need to use an "on workbook open" event handler to accomplish
this. You would also need additional code to clear out the old data
prior to import or identify another location to import to if you want
to keep the old import data. BTW, were you unable to get the
following copy /paste sequence to work?

' Copy the entire web page and then paste it as text into the
worksheet
ie.ExecWB 17, 2
ie.ExecWB 12, 0

Range("A1").Select
ActiveSheet.PasteSpecial Format:="text", Link:=False,
DisplayAsIcon:=False
Range("A1").Select

....ron