Excel 2013 VBA Ошибка
Я получаю следующую ошибку.
Compile error: The code in this project must be updated for use on 64-bit systems.
VBA-код
Option Explicit
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
Dim Ret As Long
'~~> This is where the images will be saved. Change as applicable
Const FolderName As String = "C:\Temp\"
Он отлично работает в Excel 2010.
Благодарю.
РЕДАКТИРОВАТЬ
Я получаю ошибкуRet Variable Not defined
, Вот'с остальной частью кода.
Sub Sample()
Dim ws As Worksheet
Dim LastRow As Long, i As Long
Dim strPath As String
'~~> Name of the sheet which has the list
Set ws = Sheets("Sheet1")
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow '