Your code will only trigger when you _select_ cell D2. Is that what you intended, or did you want the Change event?
Incidentally, one of the options in the parameters dialog is to have the table automatically refresh when the parameter value is changed, so you shouldn't need code.