F
Fredrik Wahlgren
Hi
I have a function which takes a cell reference as a parameter. The function
is similar to this
Function MyRef(wb As String, ws As String, cell As String)
MyRef = Application.Evaluate("[" + wb + ".xls]" + ws + "!" + cell)
End Function
The idea behind this function is simple. Instead of entering something like
this:
=[SomeSheet.xls]Sheet1!A1
I can now do this:
=MyRef("SomeSheet","Sheet1","A1")
How can I validate the last parameter? "A1" is a valid cell reference while
"XX23" isn't.
I want to to show a custom error messsage in this case.
TIA,
Fredrik
I have a function which takes a cell reference as a parameter. The function
is similar to this
Function MyRef(wb As String, ws As String, cell As String)
MyRef = Application.Evaluate("[" + wb + ".xls]" + ws + "!" + cell)
End Function
The idea behind this function is simple. Instead of entering something like
this:
=[SomeSheet.xls]Sheet1!A1
I can now do this:
=MyRef("SomeSheet","Sheet1","A1")
How can I validate the last parameter? "A1" is a valid cell reference while
"XX23" isn't.
I want to to show a custom error messsage in this case.
TIA,
Fredrik