I need some help converting the code below into a standalone visual basic exe file.
Simply, the code loops until it finds a window that is generated by a program called "EndNote". Once it find this window, it clicks on two buttons in sequence, which will close the windows (of course others things will happen in EndNote but that's outside the scope of this vba code). In the attached file, there is also a "Cancel" button in a userform that allows the user to exit the program, and close the workbook.
I want to share this with others, but don't want it to be hinged on having Excel installed, macros enabled, etc.
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
I'll have a look at this in the morning for you if noones helping you. It will be C# rather than vb though since I don't have it installed. I'll try to keep it as close to your code as possible though so you can follow it if that's ok?
Thanks for looking at this for me. I'm just going to go with an easy workaround from the MVP Orlando's site that converts it to an Exe. It isn't perfect but at least it should allow me to share it without much hassle. I will PM you because I have a question about doing this large-scale and whether or not it's worth it.
Thanks Kyle. My ignorance of C sharp comes to light ... I put the code in txt file and changed the file extension to .exe but it didn't work (I tried a few more for fun but still no cigar). Am I even remotely on the right track?
Thanks Kyle. I do have Visual C# express edition installed. I'll try to play with it over the weekend and see if I can get anywhere. It will be a learning experience.
Thanks. This works much faster than its original vba counterpart. Makes me wonder why? I guess C# is more optimized/ in sync with the windows API. Anyways, that's a thought to investigate on another day.
It actually works? I figured it might want a bit of tweaking which is why I posted the code.
c#/vb.net speeds are incomparable to VBA, they're much faster. They're compiled so they are much faster, VBA just runs in an Excel instance so it's not suprising really.
Bookmarks