Hi
Heres some of my homework. JK but this is how I think Im gonna try to Code my userform. I know I am still doing the same thing, but it is a little differant in that I am defining whatever in a function and passing it to the Sub. I like the idea of the Module level variable because I had maybe 3/4 different variables throughout my entire project & it was all the same workbook now add another 3 workbooks to that and I have a nightmare of variable madness. With the Module level variables they are all the same x or y. (Just realized the 2 known workbooks & other knowns should be constants.)
Like Kyle said to have Module level variables & set them to nothing kinda or does negates the purpose entirely. I was just doing that because thats what I learned to to at the end of a Sub. But like I said
I do have a bug closing a workbook & setting it to nothing makes Excel Crash.
So Im not gonna set anything to nothing till the last Sub and maybe not even then. Just unload the user form and close the workbook it lives in. Im doing all of this remotely so the instance that instantiates the form doesnt pickup any nasty stuff from whatever the form does or is doing.
What I mean is when I run my code locally Excels memory ramps up to half a gig and never releases it till I close Excel. By doing it remotely I avoid all that. Well it still happens it just doesnt matter as much when we are really working from somewhere else.
Yeah JohnW is great Chip too. Im gonna see if I can get that book and check it out thanks Jeff
To Kyles point.
Bookmarks