I have some VBA code that works. I’m trying to speed up user data entry by using a Userform. It’s my first Userform and don’t know why I’m getting a “File Not Found” error message when I try to execute a “Userform1.show” command buried in my calling macro in Module1.
Userform1 has 5 option buttons and 2 command buttons. The idea is for the option buttons to assign an integer number to a public declared integer variable in Module1 depending on which button is chosen. Once chosen, the coding associated with an “OK” command button determines which option button was selected and assigns the appropriate value to the public variable in Module1. The remaining “Cancel” command button simple executes “Unload Userform1”.
After I receive the “File Not Found” error message and select “OK”, I receive a “Can’t Load or Unload This Object” error message. Upon debugging, I find the “UserForm1. Show” command highlighted in yellow. When I try to save the file, I get the “File Not Found” error message again. Selecting “OK” there numerous times to get out of an endless error loop triggers all kinds of other error messages. The long and short of it is, I can’t save this spreadsheet with all my work in it. I realize without posting lots of my code it’s hard to determine exactly what’s wrong. Some general suggestions on what to look for would be a good place to start. Any help would be greatly appreciated.
Thank you,
OldRookie
Userform1 has 5 option buttons and 2 command buttons. The idea is for the option buttons to assign an integer number to a public declared integer variable in Module1 depending on which button is chosen. Once chosen, the coding associated with an “OK” command button determines which option button was selected and assigns the appropriate value to the public variable in Module1. The remaining “Cancel” command button simple executes “Unload Userform1”.
After I receive the “File Not Found” error message and select “OK”, I receive a “Can’t Load or Unload This Object” error message. Upon debugging, I find the “UserForm1. Show” command highlighted in yellow. When I try to save the file, I get the “File Not Found” error message again. Selecting “OK” there numerous times to get out of an endless error loop triggers all kinds of other error messages. The long and short of it is, I can’t save this spreadsheet with all my work in it. I realize without posting lots of my code it’s hard to determine exactly what’s wrong. Some general suggestions on what to look for would be a good place to start. Any help would be greatly appreciated.
Thank you,
OldRookie