Hi guys!
I would like to create a function that returns a named worksheet to the caller. I have tried very many ways to do this with various syntax. All compile, but all return the same error at runtime:
"Object variable or With block variable not set"
Here's the calling code:
And here's the function:
I just can't understand this. There must be a worksheet object by this name. I can see it with my own eyes, and I've just seen the code return the name of it in a message box... but when I try to return it from my function, it errs.
I'm not a VBA developer. I'm a .NET developer trying to muddle along. Am I doing something really silly here? A big "thank you" to anybody who can help.
Bookmarks