Object variable or With block variable not set (Error 91)

The Solution to Object variable or With block variable not set (Error 91) is


As I wrote in my comment, the solution to your problem is to write the following:

Set hyperLinkText = hprlink.Range

Set is needed because TextRange is a class, so hyperLinkText is an object; as such, if you want to assign it, you need to make it point to the actual object that you need.

~ Answered on 2013-12-19 21:59:43


Most Viewed Questions: