Hey guys,
My friend wanted a program for his employees that would allow them to input some data. The program would then just search an excel file for matches. If a match was found, then a message would be displayed that said "go ahead and do it." If a match wasn't found, then it would say "don't do it." Also, the employees have access to a user account on the PC that is restricted. So he wanted a desktop icon that would only run the macro, and not bring up the actual excel file. The VBA script in excel sheet and the VBScript work fine. The only problem I'm running into is when I double click the icon on the desktop (which runs the macro), the focus is not on the search window that comes up. I have to click on it to input anything. When I input something, and click "Okay," the window loses focus again, and I have to click back on it. I want it to have focus when it is ran, and to maintain focus until I click somewhere else. I would greatly appreciate any additions to the code you guys can suggest. Thank you in advance.
Script for the macro in the workbook:
Code that I pasted to Notepad and saved as .vba in order to make a desktop icon to launch the macro:
Bookmarks