Please help. I am trying to print a barcode by calling a barcode application and printing the number thru a test label formated for a Zebra printer. I have read the docs and continue to get the "Object variable or With block variable not set" error when I open the form. The application is getting called but it failes at the "Set MyDoc" line. What am I doing wrong? I have tried this two ways (actually 5,000 ways but I've narrowed it down)
First Way
Option Compare Database
Dim MyApp As Object
Dim MyDoc As Object
Private Sub Form_Load()
Set MyApp = New LabelManager2.Application
Set MyDoc = MyDoc.Documents.Add("My Documents\Mylan Documents\test.lab")
MyApp.EnableEvents = True
End Sub
Second Way
Option Compare Database
Dim MyApp As Object
Dim MyDoc As Object
Private Sub Form_Load()
Set MyApp = New LabelManager2.Application
Set MyDoc = MyDoc.Documents.Add("My Documents\Mylan Documents\test.lab")
MyApp.EnableEvents = True
End Sub
First Way
Option Compare Database
Dim MyApp As Object
Dim MyDoc As Object
Private Sub Form_Load()
Set MyApp = New LabelManager2.Application
Set MyDoc = MyDoc.Documents.Add("My Documents\Mylan Documents\test.lab")
MyApp.EnableEvents = True
End Sub
Second Way
Option Compare Database
Dim MyApp As Object
Dim MyDoc As Object
Private Sub Form_Load()
Set MyApp = New LabelManager2.Application
Set MyDoc = MyDoc.Documents.Add("My Documents\Mylan Documents\test.lab")
MyApp.EnableEvents = True
End Sub