accessing module function from sheet code
Hi,
I thought this was a standard question but I can't find it anywhere. Anyway.
withing a Worksheet_SelectionChange routine I need to either:
-access a global variable declared within a standard module (error message: Compile error: only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions) OR
-run a public function and a sub declared within a standard module (error message: "internal error")
Any clue how to do this?
Thanks in advance!!
(an answer to do both would obviously also be great)
Re: accessing module function from sheet code
I think you must have set something up strangely in your code. Both of these are normal to do in VBA. Where did you get your module from? Sounds a bit suspicious that neither of these two things work.
Re: accessing module function from sheet code
you're right, I restarted the workbook and it worked. No clue what went wrong before....
Thanks anyway!