var p: TMyBeep; begin case ComboBox1.ItemIndex of 0: @p:=@Unit1.MyBeep; 1: @p:=@Unit2.MyBeep; end; p(1000, 100); end;