Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have changed the code in the 64-bit Version as shown in your image.
There is still a compilation error. This time It says „Sub or Function not defined“, again highlighting the expression "URLDownloadToFileA" as shown:
Private Function SaveWebFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFileA(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then SaveWebFile = True
End Function
BTW, how can I insert an image between the text lines? Copy and paste didn't work. And the import image function requires a URL.
If you don't mind trying, add an "A" to Private Declare PtrSafe Function URLDownloadToFile so it reads Private Declare PtrSafe Function URLDownloadToFileA … that last error might be a simple fix.
For the images, when you go to respond, click on the attach file:
Browse for the image to upload. Once you click Upload and it is complete you can select Embed … wherever your cursor is in the message it will insert the image:
You can move the html line "[IMG]https://nexusfi.com/attachment.php?attachmentid=*****[/IMG]" to wherever you'd like the image to appear in your response.
No, I certainly don’t mind. I am very grateful to you and also @ron99 for your outstanding work here and your willingness to help with the 64-bit problem. I wished I could give back more but I am no programmer (not even close). Thank you also for your info about importing images.
I added an „A“ to URLDownloadToFile. The code in my Excel now looks as shown below:
Now there is again the old type mismatch compilation error (My Excel is the German version. The error message translates to „type mismatch“)
Let's try this … about half-way through the Download module, find the function SaveWebFile and move it up just under the Option Explicit section and make the following changes:
No more compilation errors with those changes! However, no risk files can be downloaded. After starting the download the normal message „Saving … risk files“ changes to „Unable to download risk files from server“ after a few seconds.
I already checked my parameter settings and tried various dates. No download possible. The risk files can be downloaded on my wife’s system, on which a 32-bit version of Excel is installed, so there is no problem at CME.
One last thing I can think of … let's drop the check of the 64-bit version on your machine. This is exactly how it is shown on Excel Forum ( URLDownloadToFile (API + 64 bit version) [SOLVED]) and then you would need to make a small change to the function SaveWebFile (drop A so it reads URLDownloadToFile).
Thanks, Dudetooth, but I cannot find any info on how to drop the 64-bit check in your link. The moderator posted the code for the 64-bit conversion of the URLDownloadToFile Function, that was already included in your last changes. Have I overlooked something?
That link was just to the forum where someone had posted the solution to getting URLDownloadToFile working on a 64-bit version of Excel so you could see how they posted the solution.
The screenshot I included was showing proposed change to the code at the top of the Download module … if you change the code from looking like the pic in post #595 to the pic in post #597 you will remove the 64-bit check.
I changed the code accordingly but now there is a new compilation error because the variable "lngRetVal" is not defined.
How and where can it be defined? I think it should be working after that definition.