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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carry a variable in memory (substitute)

Status
Not open for further replies.

tractng

MIS
Sep 26, 2005
21
US
Guys,

Its been years I have touch VB/VBA.

How do i carry a variable in memory. I need to put the value of Myvalue on this line below. I recall something about using the % or &, but its been too long time ago.


oPropsets2.Add "'%Myvalue%'", "Category", 2

Thanks,
Tony

----------------------------
Dim Myvalue As Variant

Myvalue = "1234"

'Dim oUserProps As PropertySet
Set oPropsets2 = oDoc1.PropertySets("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")
oPropsets2.Add "'%Myvalue%'", "Category", 2

 
Why not simply this ?
oPropsets2.Add Myvalue, "Category", 2

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top