Where is this code located? If it's inside a container/control in the form, you have to use THISFORM instead of THIS.
>I would like to click a button with code and have tried
this.Command1.click
> but no luck. Please show the old geezer how it's done.