Print From Vba Follow
I want to update a text box in Bartender from excel. The textbox has a shared name of "Part". I'm running this code from vba in excel:
btFormat.SetNamedSubStringValue "part", "5"
I get an error saying that "part" is not a named data source.
Help...
10 comments
Did you set the name of the data source itself, or the name of the label object? It needs to be a name of the data source, which by default is blank.
In the Text Properties under the Data Source tab, I changed the "Name:" Field to "Part". The type is Embedded Data. I'm getting the same error today.
Have you tried using parenthesis?
btFormat.SetNamedSubStringValue("Part", "5")
In fault finding, use the GetSubString() call to iterate through all sub-strings in the document. I guess this will help to uncover where you're going wrong.
'Select the data source
btSubString = btFormat.NamedSubStrings.GetSubString(1)
'Show the data source's name
MessageBox.Show(btSubString.Name)
If I use the parenthesis I get:
Compile Error:
Expected: =
I tried the code you suggested.
I get this:
The named data source 1 is not found in the named data source list.
I suggest you attach your BarTender document and paste in the relevant section of code for us to take a look at.
I tried changing the field to a globalitem. I'm able to update the field, however, Bartender freezes while trying to print.
For anyone who may read this, since Bartender never gave me an answer, here is what I found finally worked:
Dera All we have display to below error "Run-time Error '429': ActiveX Component cant't create Object" please help to clear about matter ...
Object code
Set btApp = New BarTender.Application
Could be any one of a number of different causes, such as BarTender not being installed, activated, or of a sufficient edition to support automation. There are other possibilities also.
Please sign in to leave a comment.