Fix suggested ms1418 works great! Rated 3 out of 5 stars

Adding the If statement as suggested by ms1418 solved the pop up error box reported.

Thanks!