Hi - I am fairly new to VBA (about 1 year) but have a project on the go and have encountered a problem: Here is what I have right now:
1. Load a UserForm with a variety of command buttons one of which has an Exit function and one a Load function (amongst others)
2. The Exit button is used to terminate a "session" (not close the workbook) and to empty a procedure which contains variable settings read from a .txt file
3. The Load button reads a .txt file and pastes into a proc shell that exists within the same module as the UserForm. Not sure if this is necessary but thats where it is right now!
4. Within the Load command button code I have a call (after the proc shell has been populated...so I now have a valid proc) to execute this proc....in the hope that this will initilise these variables as it supposed to. However it seems to ignore this "CALL" and only executes it when I am performing an unload which (I read somewhere else) can appear like an Initialize event if something is "not loaded previously" (which sounds a bit vague to me).
So the question is:
1. How do I get the Load button to "Load" and then execute a successful Call to the newly populated proc?
Alternatively,
2. is there a better way to populate a proc from a text file and then execute the code in that proc from a single command button click?
(I do not currently want to read the variables by doing a line-by line search through the text-file (as I do elsewhere in my project)...for now I want to simply load the proc and then execute it with one button....)
Thanks in advance for any help
Bookmarks