# VBForums CodeBank > CodeBank - Visual Basic 6 and earlier >  [VB6] Create a TaskPane For Ms Office : Excel - Word - Access - PowerPoint - Outlook

## PhuongNam

1/ About 2 years ago I wrote 1 AddIns Taskpane on VB6 which is very good for 32-bit Office. But when I copy to another computer, it gives me an error of missing libraries. I find the relevant libraries. Copy through Regsvr32 but still can't use it ... after a while I switched to Ms Office 64 bit, it was completely unusable on VB6 machine Because UserControl.ocx written on VB6 is 32 bit, so I give it up and don't use it anymore.

2/ Recently due to need and I'm self-studying Delphi, so I wrote a small function using ActiveX COM that connects to UserControl.ocx and works well when you write OCX as VB6 copy to another computer attached. DriverTaskPane.dll written by me works fine without any missing library error

3/ I uploaded it here to share it with anyone who needs it
4/ To use it do the following:

- on VB6 you design a UserControl.ocx and what you write in it depends on your usage needs

- Download 2 libraries I wrote including 32 and 64 bit

32 is only used for *.OCX 32 bit and 64 is only used for *.OCX 64 bit

- From VBA declare to use as follows:


```
Sub ShowTaskPane()
    Dim CTP As Object
    Set CTP = CreateObject("DriverTaskPane.cTaskPane")
    With CTP.CreateCTP("VB6.UserControl1", "My Caption") ''VB6.UserControl1 = UserControl.OCX
        .DockPosition = msoCTPDockPositionRight
        .Visible = True
   End With
   Set CTP = Nothing
End Sub
```

after running the code it will show your From UserControl in TaskPane Excel

5/ DriverTaskPane.dll supports all programming languages that support writing ActiveX and creating UserControl.ocx according to Ms.

6/ Support for Use for Ms Office: Excel - Word - Access - PowerPoint - Outlook

7/ You only need to write 1 UserControl.ocx to use it for Excel - Word - Access - PowerPoint - Outlook

https://github.com/KieuManh366377/Dr...OMTaskPane.rar

(I don't know English - Google translate and I didn't learn to program, but I learned from Google myself, so the sentences will not be correct, if there is anything wrong, please forgive me)

----------


## PhuongNam

After successful execution, it will display as shown below

I don't use Ms Office 2003 so I can't test it and I don't know if it's usable or not for Office 2003...

good use from Ms Office 2007 to 2021 for 32 and 64 bit

----------


## loquat

where is the source code please?

----------


## PhuongNam

> where is the source code please?


You create a code project on your VB6 as UserControl.ocx and then follow the instructions of post #1.

I uploaded the file very slowly, waiting for a long time
you follow the following image and then Make it will produce a file VB6.ocx
finished you Regsvr32 for File DriverTaskPane32.dll and File VB6.ocx
Then Copy the Code of Lesson 1 into VBA and run it to see the TaskPane it shows up




UserControl.zip

----------


## PhuongNam

On my computer... I'm designing Web embeds in TaskPane and find it interesting too

----------

