At first sight it seems your problem is how you have defined the variable LOPNum
It should be
Dim LOPNum As Double 'NOT as integer

There is also a fair number of redundant lines in your code.
I'll go through your code and do a bit of tidying and trimming.
Look back this afternoon I will have something for you.