SetNamedSubStringValue ERROR / Excel VBA S’abonner

Martin Maatman


I have written a code in VBA but I get an error in this line:

btFormat.SetNamedSubStringValue "Test", "Hallo"

It can't find 'Test'. I have created a textbox in the bartender document called 'Test'.

What am I missing, doing wrong...


Sub TSC_Etiketten()
Dim BarTender As Object
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
Set btApp = New BarTender.Application
Set btFormat = New BarTender.Format
btApp.Visible = True
btApp.Formats.Open ("C:\Users\MTC\Documents\BarTender\BarTender Documents\Document1.btw")
btFormat.SetNamedSubStringValue "Test", "Hallo"
btApp.ActiveFormat.IdenticalCopiesOfLabel = 3
btFormats = btApp.ActiveFormat.PrintOut
End Sub

1 commentaires

Mike Wright
Actions pour les commentaires Permalien

The SetNamedSubStringValue changes the value in a Named Data Source.

You must create a Named Data source and tie your text box to the Named Data Source.

you then use SetNameSubStringValue to change the value in the Name Data Source.

Vous devez vous connecter pour laisser un commentaire.