LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Login to intranet and download excel file using vba

Thanks for your suggestion.

I tried "URLDownloadToFile", but it doesn't give me the desired result. It
downloads the login page and stores it to the sheet.


If your file is stored on the web then that file should be downloaded to the
folder you specify, after which you can open it in Excel...

Sub UrlDownload()
' Downloads a specified file from a specified URL folder,
' to a folder of a specified path.
' **This is IE dependant and writes to the IE cache!
Const sSrc$ = "UrlDownload"

Dim sSrcFile$, sTgtFile$, n&

'Download the file
sSrcFile = "http://...wiki/download/List.xls"
sTgtFile = ThisWorkbook.Path & "\List.xls"
On Error Resume Next
n = URLDownloadToFile(0, sSrcFile, sTgtFile, 1, 0)

'Open the file
Workbooks.Open sTgtFile
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
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
Login into secure web site and download data into worksheet? ryguy7272 Excel Programming 5 April 14th 09 12:10 AM
Intranet Excel File...Changing Name Sharky23 Excel Worksheet Functions 1 May 24th 06 03:15 AM
Open excel file from password protected Intranet site(IE) Dan McCollick Excel Programming 4 May 17th 06 07:37 PM
Creating a User login Log file for an Excel workbook [email protected] Excel Programming 7 March 30th 06 03:39 PM
Intranet Link to excel file muziq2[_4_] Excel Programming 0 February 28th 04 05:41 AM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"