JKwan
07-28-2011, 07:40 AM
I have the following:
With cb.Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Find Synergi case #"
.TooltipText = "Find Synergi case # - Globally"
.Style = msoButtonCaption
.OnAction = "FindCaseNumber"
End With
With cb.Controls.Add(Type:=msoControlEdit)
.Text = ""
.Tag = "FindSynergiCaseNumber"
.TooltipText = "Find Synergi case # - Globally"
End With
What I am trying to do is to read what was typed into the Control Edit object, however, I am failing miserably! I thought that I can read it by
Sub FindCaseNumber()
Dim SynergiCaseNumber As CommandBarControl
Set SynergiCaseNumber = CommandBars("ProcessSafetyTotals").FindControl(, , "FindSynergiCaseNumber")
MsgBox SynergiCaseNumber.Text
End Sub
I am always getting blank.... Is there a way that I can read the control's text?
With cb.Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Find Synergi case #"
.TooltipText = "Find Synergi case # - Globally"
.Style = msoButtonCaption
.OnAction = "FindCaseNumber"
End With
With cb.Controls.Add(Type:=msoControlEdit)
.Text = ""
.Tag = "FindSynergiCaseNumber"
.TooltipText = "Find Synergi case # - Globally"
End With
What I am trying to do is to read what was typed into the Control Edit object, however, I am failing miserably! I thought that I can read it by
Sub FindCaseNumber()
Dim SynergiCaseNumber As CommandBarControl
Set SynergiCaseNumber = CommandBars("ProcessSafetyTotals").FindControl(, , "FindSynergiCaseNumber")
MsgBox SynergiCaseNumber.Text
End Sub
I am always getting blank.... Is there a way that I can read the control's text?