|
-
Aug 24th, 2004, 05:19 AM
#1
Thread Starter
Fanatic Member
MS Word and CommandBar [RESOLVED]
Hi all need some help over here. I am placing a Cobmbox in the standard command bar in MS Word, I want to know how i can detect if the value in the combo has changed.
I have wrote the followig to fill the combo put how can i detect if the value has changed
VB Code:
Dim conTelList As ADODB.Connection
Dim recNames As ADODB.Recordset
Set conTelList = New ADODB.Connection
conTelList.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Lvp-web\published\websites\Ganda intranet\_databases\phone_internal2000.mdb;Persist Security Info=False"
Set recNames = New ADODB.Recordset
recNames.Open "plist1partner", conTelList
Dim objToolbar As CommandBar
Dim btnItem2 As CommandBarComboBox
Set objToolbar = CommandBars("standard")
Set btnItem2 = objToolbar.Controls.Add(Type:=msoControlComboBox, _
Temporary:=True)
With btnItem2
Do While Not recNames.EOF
.AddItem recNames(1)
recNames.MoveNext
Loop
btnItem2.ToolTipText = "Names"
End With
Thanks!!!!
Last edited by Bombdrop; Aug 24th, 2004 at 06:07 AM.
Useful Links
.Net
#Develop, GhostDoc, CodeKeep , be.PINVOKE, Good Code Snippet Site
Krypton Toolkit, XPCC / XP Common Controls, QSS Windows Forms Components
VB.COM
VB.Classic Help File, MB Controls, MZTools, ADO Stored Procedure Generator add-in,
-
Aug 24th, 2004, 06:07 AM
#2
Thread Starter
Fanatic Member
Found out how to do it
VB Code:
btnItem2.OnAction = "MySub"
Useful Links
.Net
#Develop, GhostDoc, CodeKeep , be.PINVOKE, Good Code Snippet Site
Krypton Toolkit, XPCC / XP Common Controls, QSS Windows Forms Components
VB.COM
VB.Classic Help File, MB Controls, MZTools, ADO Stored Procedure Generator add-in,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|