Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import .BMP File From Web Using VBA
Does anyone have a quick solution for saving a .bmp file from a WEB page
into excel using VBA? Thanks, Donnie |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import .BMP File From Web Using VBA
Hi Donnie,
Here is a quick solution with API. Code: -------------------- Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _ szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Sub Test() 'Change url to the bmp Const strUrl As String = "http://www.exceltip.com/images/newsite/hdr_bg.jpg" Dim strSavePath As String Dim returnValue As Long strSavePath = ThisWorkbook.Path & "\" & "Test.jpg" 'Change Ext as .bmp returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0) MsgBox IIf(returnValue = 0, "Succeed!", "Not succeed!") End Sub -------------------- --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
import file so that it is a actual csv file, no excel cell version | New Users to Excel | |||
import data from txt file to an existing excel file | Excel Discussion (Misc queries) | |||
Would Like to Automate Batch File Creation and Text FIle Import | Excel Discussion (Misc queries) | |||
Get External Data, Import Text File, File name problem | Excel Programming |