It will probably work, since any numeric value other than 0 is usually
interpreted as True in Boolean assignments, but vbYes is actually one
of the defined (Integer) vbMsgBoxResult return values, not a Boolean
value.
As others have implied, the OP's syntax is correct, but there may be a
missing .Update statement.