View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
CT[_2_] CT[_2_] is offline
external usenet poster
 
Posts: 4
Default Creating buttons using VBA

I am trying to create a button and put it onto a spreadsheet using VBA.

Dim cmdButton As Object
Set cmdButton = CreateObject("Forms.CommandButton.1")
cmdButton.Top = 0

Run time error 438;
Object: doesn't support this property or method

Occurs on cmdButton.Top = 0

I am trying to set the position of the top of the new command button.
Where am I going wrong?

Thanks,
Tim