In VB the apostrophe in VB stands for start of comment, use Chr(39) in place of that.