Designing Window :-
First step right click on toolbox and add components it will show components popup window from it on control tab add Microsoft Windows Common Controls 6.0 (SP6) click on check box of selected items only and then click on OK button .It will show more tools like tool bar and image list on toolbox take it on form window and write the below code in coding window.
Code:-
Private Sub Form_Load()
Toolbar1.ImageList = ImageList1
Dim b1 As Button
Set b1 = Toolbar1.Buttons.Add
b1.Style = tbrDefault
b1.Caption = "New"
b1.Image = 1
Dim b2 As Button
Set b2 = Toolbar1.Buttons.Add
b2.Style = tbrDefault
b2.Caption = "Open"
b2.Image = 2
Dim b3 As Button
Set b3 = Toolbar1.Buttons.Add
b3.Style = tbrDefault
b3.Caption = "Save"
b3.Image = 3
Dim b4 As Button
Set b4 = Toolbar1.Buttons.Add
b4.Style = tbrDefault
b4.Caption = "Copy"
b4.Image = 4
Dim b5 As Button
Set b5 = Toolbar1.Buttons.Add
b5.Style = tbrDefault
b5.Caption = "Paste"
b5.Image = 5
End Sub
First step right click on toolbox and add components it will show components popup window from it on control tab add Microsoft Windows Common Controls 6.0 (SP6) click on check box of selected items only and then click on OK button .It will show more tools like tool bar and image list on toolbox take it on form window and write the below code in coding window.
Fig :- Design View of program for taking tool bar on form
Code:-
Private Sub Form_Load()
Toolbar1.ImageList = ImageList1
Dim b1 As Button
Set b1 = Toolbar1.Buttons.Add
b1.Style = tbrDefault
b1.Caption = "New"
b1.Image = 1
Dim b2 As Button
Set b2 = Toolbar1.Buttons.Add
b2.Style = tbrDefault
b2.Caption = "Open"
b2.Image = 2
Dim b3 As Button
Set b3 = Toolbar1.Buttons.Add
b3.Style = tbrDefault
b3.Caption = "Save"
b3.Image = 3
Dim b4 As Button
Set b4 = Toolbar1.Buttons.Add
b4.Style = tbrDefault
b4.Caption = "Copy"
b4.Image = 4
Dim b5 As Button
Set b5 = Toolbar1.Buttons.Add
b5.Style = tbrDefault
b5.Caption = "Paste"
b5.Image = 5
End Sub
=============================================
OUTPUT