Problem referring to a particular sheet in VBA
On Mon, 18 May 2009 20:28:34 -0500, Dave Peterson
wrote:
If your code is in a general module, then I would think it would work -- if all
the sheets are worksheets.
But if your code is behind a worksheet, you could also try:
debug.print application.range("'" & ....
Due to laziness I guess, my code was in one of the worksheets. When I
tested out everyone's suggestions, I happened to put the code in a
handy module and it all worked.
Your suggestion of "Application.Range" also worked fine in the
spreadsheet code.
I think my lesson here is to be more diligent with putting code in the
proper place. I figure this kind of general code should be in a
module.
Thanks for all the help
tbone
|