Hello, It's been a long time since I have used open office. I used an excel spreadseet with vba macros for my cash register program. As a small business that has just opened I'd rather not buy a copy of office. I keep getting a syntax error for VB tab. Hoping someone can help me fix the code. I gave up programming decades ago so i understand the basics but coding alludes me nowadays. The vbTab in line 5 is where i am getting the error code. Let me know if you need any other info. Thanks in advance
Option Explicit 'make sure all variables have to be defined
Public Const code39barcodefontname As String = "Free 3 of 9"
'Code39 barcode font name, if you use a different Code 39 barcode font
'change the font name here
Public Const sdDelimiterASCII As String = "," 'The ASCII sales data file delimiter
Public Const sdDelimiterUnicode As String = vbTab
'The Unicode sales data file delimiter - NOTE: We make this TAB as excel can open
'a TAB delimited unicode file correctly just by double clicking on the file icon.
'Excel does not open unicode delimted files correctly if you use a comma as delimiter.
Public Const maxrows As Long = 1048576
'the maximum number of rows possible in an excel 2007-2010 worksheet
Public trainingmode As Boolean
'not in EPOS training mode = false; in EPOS training = true
Public Const maxtry As Double = 40
'the number of times we try to open a file for writing to
Public Const maxsdcols As Double = 41
'the maximum number sales data columns - See the sales data settings worksheet
Public oldsheet As Worksheet
Last edited by robleyd on Sat May 18, 2019 1:57 am, edited 2 times in total.
Reason:Added Code tags
Maybe the constant/variable named vbTab is a part of the MS Office environment, but it is unknown in AOO/LO environment.
What is it? Is it an ASCII or UbiCode character? Try to use use an equivalent string value instead it.
Last edited by Zizi64 on Sat May 18, 2019 6:53 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
option compatible
Public Const sdDelimiterUnicode As String = " "
'Public Const sdDelimiterUnicode As String = vbTab 'gives syntax error
Sub Main
msgbox asc(vbTab)
msgbox asc(sdDelimiterUnicode)
End Sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)