Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Tag Values 2

Status
Not open for further replies.

summerdawnc

Technical User
Nov 27, 2012
3
US
Private Sub Command_DALL_Click()
Dim intReturn As Integer
Dim tv As TaggedValues
Dim prdGroup1 As String
Dim prdGroup2 As String
Dim prdGroup3 As String
prdGroup = "nothing."

Set tv = New TaggedValues
tv.Text = Me.dallln2heritageph.Tag
If tv.Exists("PrdGrp") Then
prdGroup1 = tv.Item("PrdGrp")
End If

[highlight #8AE234]intReturn = MsgBox("The product group tag for the first control is
prdGroup1 & vbInformation, "Command Button")[/highlight]

Could I please get some assistance with my intReturn statement? I am receiving compile and syntax errors and am not able to correct the parameters. Newbie here...go easy on me! :)
 
First, your code isn't VBS
Second, replace this:
intReturn = MsgBox("The product group tag for the first control is
prdGroup1 & vbInformation, "Command Button")
with this:
intReturn = MsgBox("The product group tag for the first control is " & prdGroup1", vbInformation, "Command Button")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I need to string multiple product groups- here is the sample below

Ex:

intReturn = MsgBox("The product group tag for the first control is " & prdGroup1, prdGroup2, prdGroup3, " & vbInformation, & Command Button")


I am now receiving a runtime error '13' Type mismatch.

The goal is to get a pop up that list the product group tag values upon click.

Also if this isn't VBS, what is it? It says Microsoft Visual Basic for Applications at the top of my window. Working on an access project.

Thank you for the responses, I do appreciate it.
 
This is VBA.
intReturn = MsgBox("The product group tag for the first control is " & prdGroup1 & ", " & prdGroup2 & ", " & prdGroup3, vbInformation, "Command Button")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
summerdawnc,

Some other forums here for future reference:
forum705
forum707
 
Thank you very much.

I am running over to the other forums right now.

Have a great week, y'all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top