In my code below I expected to get a local macro (myvars2) with a list of all my variables (which are in local macro "myvars" after -ds-) minus the variable "casenumber". However, my manipulation of lists doesn't do it and "myvars2" is identical to "myvars". Any suggestions what's wrong with my code?

Code:
ds
local myvars r(varlist)
local to_exclude casenumber
local myvars2: list myvars - to_exclude