Try this
Public Sub Tray(ByVal hWnd&, ByVal hIcon As StdPicture, ByVal sTip$, Acao As Acoes)
Dim i As NOTIFYICONDATA
With i
.hWnd = hWnd
.hIcon = hIcon
.szTip = sTip & vbNullChar
.uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
.uCallbackMessage = &H200
.uID = vbNull
.cbSize = Len(i)
End With
Shell_NotifyIcon Acao, i
End Sub