anilkumar
09-22-2008, 12:36 AM
Hi,
I am kind of new to VBA/Outlook coding, but I do have some general programming experience.
I am trying to (programmatically) create a custom toolbar with a custom button in. But I can't get the button's .OnAction event to fire. I am doing everything as it says in several tutorials/guides, but it just doesn't work.
I am using WindowsXP Pro / Office 2003
Here is the code for your reference,
Set btnNewCustom1 = _
tlbCustomBar1.Controls.Add(Type:=msoControlButton)
With btnNewCustom
.Style = msoButtonIconAndCaption
.Visible = True
.OnAction = "click"
End With
Function click()
MsgBox ("Message")
End Function
I am kind of new to VBA/Outlook coding, but I do have some general programming experience.
I am trying to (programmatically) create a custom toolbar with a custom button in. But I can't get the button's .OnAction event to fire. I am doing everything as it says in several tutorials/guides, but it just doesn't work.
I am using WindowsXP Pro / Office 2003
Here is the code for your reference,
Set btnNewCustom1 = _
tlbCustomBar1.Controls.Add(Type:=msoControlButton)
With btnNewCustom
.Style = msoButtonIconAndCaption
.Visible = True
.OnAction = "click"
End With
Function click()
MsgBox ("Message")
End Function