Prevent null reference exception when expression contains a single quoted worksheet name with an embedded ! character. Previously the single quotes were removed and the code simply split on the ! because it assumed the ! separated the worksheet name from the address. In the case of a worksheet name with an embedded !, the split erroneously occurred on the ! within the worksheet name. We then got a null reference exception because the worksheet name was invalid and could not be found.
1 file changed