Your code has a few errors in it, even before you reach the hyperlink part.
For example, Cell isn't defined when this code is executed so it causes an error.
You won't see that error though as you have On Error Resume Next, the code will be skipped and StrMth will stay at it's default value of 0.
What is Cell supposed to refer to?
The next error you won't see is here.
VBA will be looking for a named range called 'rng' when there isn't one.
That will also cause a problem here as Cell is Nothing.
[/code]
The only line of code that won't error is this one, but all it will do is put 0 in A2 on the active sheet.
This code will run without error and it seems to work to some extent, but I'm not sure it does everything you want it to.
Bookmarks