|
先上图吧!
我自己用access 弄了个管理软件,满足自己日常工作需要,现在想要实现控件打印的功能,官方网站提供了VBA调用dll的范例,有Excel 的和access的,Excel的范例和access的范例模组都是一样的,可现在Excel 可以正常调用,access 就报上图的提示,现在不知道要如何解决,估计官方的案例只是在Excel 里进行了测试没有在access里进行测试!
- Option Compare DatabasePublic Declare Sub openport Lib "TSCLIB.DLL" (ByVal PrinterName As String)
- Public Declare Sub closeport Lib "TSCLIB.DLL" ()
- Public Declare Sub sendcommand Lib "TSCLIB.DLL" (ByVal command As String)
- Public Declare Sub setup Lib "TSCLIB.DLL" ( _
- ByVal LabelWidth As String, _
- ByVal LabelHeight As String, _
- ByVal Speed As String, _
- ByVal Density As String, _
- ByVal Sensor As String, _
- ByVal Vertical As String, _
- ByVal Offset As String)
- Public Declare Sub downloadpcx Lib "TSCLIB.DLL" ( _
- ByVal Filename As String, _
- ByVal ImageName As String)
- Public Declare Sub barcode Lib "TSCLIB.DLL" ( _
- ByVal X As String, _
- ByVal Y As String, _
- ByVal CodeType As String, _
- ByVal Height As String, _
- ByVal Readable As String, _
- ByVal rotation As String, _
- ByVal Narrow As String, _
- ByVal Wide As String, _
- ByVal Code As String)
- Public Declare Sub printerfont Lib "TSCLIB.DLL" ( _
- ByVal X As String, _
- ByVal Y As String, _
- ByVal FontName As String, _
- ByVal rotation As String, _
- ByVal Xmul As String, _
- ByVal Ymul As String, _
- ByVal Content As String)
- Public Declare Sub clearbuffer Lib "TSCLIB.DLL" ()
- Public Declare Sub printlabel Lib "TSCLIB.DLL" ( _
- ByVal NumberOfSet As String, _
- ByVal NumberOfCopy As String)
- Public Declare Sub formfeed Lib "TSCLIB.DLL" ()
- Public Declare Sub nobackfeed Lib "TSCLIB.DLL" ()
- Public Declare Sub windowsfont Lib "TSCLIB.DLL" ( _
- ByVal X As Integer, _
- ByVal Y As Integer, _
- ByVal fontheight As Integer, _
- ByVal rotation As Integer, _
- ByVal fontstyle As Integer, _
- ByVal fontunderline As Integer, _
- ByVal FaceName As String, _
- ByVal TextContent As String)Public Declare Sub windowsfontU Lib "TSCLIB.DLL" ( _
- ByVal X As Integer, _
- ByVal Y As Integer, _
- ByVal fontheight As Integer, _
- ByVal rotation As Integer, _
- ByVal fontstyle As Integer, _
- ByVal fontunderline As Integer, _
- ByVal FaceName As String, _
- ByVal TextContent As String)Public Declare Sub about Lib "TSCLIB.DLL" ()Public Declare Function isusbportready Lib "TSCLIB.DLL" () As Integer
- Public Declare Function usbportqueryprinter Lib "TSCLIB.DLL" () As Integer
- Public Declare Function usbportwrite Lib "TSCLIB.DLL" (ByVal command As String) As Integer
-
复制代码 模组的内容如上图,求老师帮忙看看是不是哪里有错误,造成access 无法执行!
|
|