求高手帮忙解决:VBA调用BarTender时出现429错误
bartender吧
全部回复
仅看楼主
level 1
mjabc1111 楼主
Sub Print_carton()
Dim file_path As String
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
file_path = "d:\aa.btw"
'----------------------------------------------------------------------
'Order bartender print lab as templet
'----------------------------------------------------------------------
Set btApp = CreateObject("BarTender.Application")
btApp.Visible = False
Set btFormat = btApp.Formats.Open(file_path)
'---------------------------------------------------------------------
' Assignment a value to variable.
'---------------------------------------------------------------------
btFormat.SetNamedSubStringValue "Var1", Cells(2, 1)
' Implement print
btFormat.PrintOut
btFormat.Close btDoNotSaveChanges
btApp.Quit
End Sub
2016年05月21日 11点05分 1
level 1
代码老是报“运行时错误429:ActiveX 部件无法创建对象”的错误,调试发现代码执行到这里:Set btApp = CreateObject("bartender.application") ,如果是这个错误的话,请重新激活bartender,激活的时候版本选择automation版。
2018年12月19日 09点12分 2
1