VB5! um, lemme think...
Add a Module to your application and use the Global keyword to define you variables and make the variable's scope, the entire application.
Simply, declare your variable in the scope you want them to be. If you want it outside your subs and functions, well "DIM" it outside the subs and functions.
But, why do you want to do "Global declaration"? Re-design your application or use alternative ways like files or database tables; Global variables are known to be hard to maintain over time. Think of the time you're opening the vb files you've closed 6 months ago! You'll certainly won't know what's there!!
And one last point, using VB versions prior to VB.Net WILL reduce your functionality and sometimes you will have to write some C++ line to make the dreams come true (for Performance/Size/Professional Programming). I'd suggest while you're a novice as you said, be a novice in VB.Net instead of VB5!
Good luck :)
------------------------------------------
I'm not criticizing you or VB5. I've been coding Basic since Sinclair's Spectrum 48 and I was a VB developer too and I loved the shift from vb4 to vb5 ...
Anyway; You seem to want the answer and nothing more! OK, I'll give you the code:
'Add a "MODULE" to your application, just like when you want to add a form to your app.
'Then write these lines of code inside it.
'Module1.bas
Global nSomeVar As Integer
Global strSomeOtherVar As String
'Now you may use these two variables everywhere in your application. Remember, Since a global variable is always in the scope, It will never reset and will always save its value...
'See section 4 in the below link to get a better idea on what's goin' on...
------------------------------
BTW, I thought I read you wrote "I don't want to have to keep copying code.", that's why I didn't supply the code.
Even MSDN website does not support VB5 users anymore... The oldest VB version on MSDN is 6!
gL ;)