0

I used the code here: IE11 Frame Notification Bar Save button

to get past the open/save/cancel dialogue box when downloading an excel file from IE11. I switched the code to say "open" rather than "save". But, the VBA doesn't open the file all the way, it appears like it's going to then doesn't. After the code finishes executing the dialogue box saying "the file format and extension … don't match". Then I click yes and the file opens.

How can I open the file using VBA code?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • use the same `findwindow` to click the "Yes" on that dialogue box that pops up. I don't think there is another way since that is what happens when you download manually as well. – Scott Holtzman Sep 17 '18 at 19:14
  • Thanks, how do I figure out what to put in this line: – user2839872 Sep 17 '18 at 19:20
  • h = FindWindowEx(h, 0, "Frame Notification Bar", vbNullString) – user2839872 Sep 17 '18 at 19:20
  • Did you study the `FindWindowEx` API to understand what it's doing? If so, that will allow you to find your answer. :) Double check, bc it's been a while for me, but I think the solution is to place the title of the new window into the 3rd argument. – Scott Holtzman Sep 17 '18 at 19:32
  • I've been trying to understand it, but don't at this point. – user2839872 Sep 18 '18 at 15:21

0 Answers0