![]() Private Declare PtrSafe Function URLDownloadToFile _Īpplication. 'Private Declare Function URLDownloadToFile Lib "urlmon" _ If there's nothing to be done about it I can ask the IT guys for permission to install the 32-bit version again, but I would like to see if I can get this fixed before I hassle them. Replacing them all got me the same compile error though, this time highlighting this: "If k > 1 Then extension = Mid(URL, k - 1)"Īny help with this would be greatly appreciated, I use this snippet all the time. I (a noob) googled around a bit and thought the fact that the code had Long instead of LongPtr might be the culprit. ![]() I also suggested that option 1) is the preferred way to go since MS does not encourage the installation of Office 64-bit for the majority of users. I commented out the 32-bit stuff at the top and 'activated' the 64-bit part, but when running it I get a Compile error: Type mismatch highlighting "Ret = URLDownloadToFile(0, URL, strPath, 0, 0)" 2) Install an Office other than 2013 under 64-bit. If Len(extension) > 1 And Len(extension) = LastRow Then Exit SubĪpplication.OnTime Pausetime Now, "DownloadAndRename" If k > 1 Then extension = Mid(URL, k - 1) LastRow = SKUs.Cells(.Rows.Count, 1).End(xlUp).Row Columns("A") 'SKUs located in this column ******Had to change this statement Columns("B") 'First column of files to download ******Had to change this statement MaxCols = 10 'Maximum number of URLs in a row to download 'Downloads files from columns I through M, renames them after the SKU in column M, then puts the new name in columns N through Rĭim LastRow As Long, i As Long, j As Long, k As Long, maxCols As Longĭim SKU As String, strPath As String, URL As Stringĭim extension As String, rg As Range, SKUs As Range Computers running 64-bit versions of Windows generally have more resourcessuch as processing power and memorythan their 32-bit predecessors. Change as applicableĬonst FolderName As String = "C:\Temp\" 'How Brad tested the code *****Had to change this statement The 64-bit version is the right choice if you plan to use large files, if you have a lot of files, and if you have a computer thats running a 64-bit version of Windows. '~~> This is where the images will be saved. ![]() ![]() Lib "urlmon.dll" Alias "URLDownloadToFileA" _ 'Private Declare PtrSafe Function URLDownloadToFile _ Private Declare Function URLDownloadToFile Lib "urlmon" _Īlias "URLDownloadToFileA" (ByVal pCaller As Long, _īyVal szURL As String, ByVal szFileName As String, _īyVal dwReserved As Long, ByVal lpfnCB As Long) As Long ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |