Whats the difference between variables declared using Global and variables declared using Public?
Nothing. Global is included with VBA for compatibility with other versions of Basic. Public is preferred, but using Global does exactly the same thing. I’m confused over the Public keyword. According to the Visual Basic User’s Guide: “Variables declared using the Public statement are available to all procedures in all modules in all applications unless Option Private Module is in effect; in which case, the variables are Public only within the project in which they reside.” This does not seem to be the case. Why? For this to work, you must use the Tools References command (available only in VBA modules) to register the workbook that contains the reference you want to use. I’m having trouble using SendKeys to send a left bracket ({) or a right bracket (}). It tells me there’s an invalid procedure call. This was a known bug in Excel 5, and it hasn’t been fixed in Excel 95.