Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const WM_USER = &H400
Private Const TB_PRESSBUTTON = (WM_USER + 3)
Private Const TB_GETBUTTON = (WM_USER + 23)

Type TBBUTTON
iBitmapas As Integer
idCommand As Integer
fsState As Byte
fsStyle As Byte
dwData As Long
iString As Integer
End Type

Private Sub Form_load()
Dim but As TBBUTTON
SendMessage Toolbar1.hwnd, TB_GETBUTTON, 1, but '1 is the index button.
SendMessageToolbar1.hwnd, TB_PRESSBUTTON, but.idCommand, True
End Sub

I want to press to a button toolbar without using mouse .
What is wrong with this code. And Thank You..