0

Hopefully somebody can guide me in the right direction. I have VBA code that I made that can be ran on multiple Excel spreadsheets. The person I made the code for wants a .exe file with a GUI that can be opened and then you select the excel file you want and it will export a new Excel file that has been modified.

I have not tried anything but research. I understand that this may be beyond VBA for Excel's functionality but if so can somebody guide me in the right direction? Thank you for any help!

Brendan
  • 25
  • 4
  • To keep it in VBA you can look at a personal binary workbook with a userform. Your other option is to write a gui in another language and then call the vba from that. – Warcupine Jul 17 '19 at 13:48
  • 1
    I would recommend grabbing Visual Studio and creating a VSTO office add-in. You can use [this tutorial](https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-an-office-solution-by-using-windows-installer?view=vs-2019) as a guide for how that works. You will be writing in C#, but you'll find that much of the excel interaction feels similar to VBA. This obviously has a big fat learning curve, but it's also very powerful. – JNevill Jul 17 '19 at 13:58
  • 1
    A less difficult to learn option is an HTA application which is still supported even in Windows 10. This is a vbscript based application that uses HTML (and javascript) for the UI. You can send them the .hta file you create and they can open it like an executable and depending on your HTML skills, it can feel very much like a native program. Writing vbscript will feel comfortable since it's very similar to VBA. – JNevill Jul 17 '19 at 13:59
  • VBA won't compile an executable .exe file. You can make an Excel add-in that Excel will load at startup (just like @JNevill's VSTO Office add-in suggestion, but in VBA), and then this special document can work at application level and as far as I can tell that *could* work for that person's purposes. If they're adamant that it needs to be a standalone executable, it can't be VBA. – Mathieu Guindon Jul 17 '19 at 14:15
  • Check this [WSH VBS GUI](https://stackoverflow.com/a/47111556/2165759) solution. – omegastripes Jul 17 '19 at 17:02

0 Answers0