MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Sub Test MsgBox(oGet_Invoice_Number) End Sub Function oGet_Invoice_Number() As Long Try Dim oLastInvoiceNumber As Long Dim oInvoiceNumber As Long If System.IO.Directory.Exists("c:\Program Files\KISS_Accounting") = False Then System.IO.Directory.CreateDirectory("c:\Program Files\KISS_Accounting") End If Dim FILE_NAME As String = "c:\Program Files\KISS_Accounting\Invoice_Number.txt" 'So first see if text file is there - if not write the initial file with 1 as number If System.IO.File.Exists(FILE_NAME) = False Then Dim oWriter As New System.IO.StreamWriter(FILE_NAME) oWriter.Write("1") oWriter.Close() oGet_Invoice_Number = 1 Exit Function Else Dim oReader As New System.IO.StreamReader(FILE_NAME) Dim oReadLine As String = oReader.Read() oLastInvoiceNumber = CLng(oReadLine) oReader.Close() oInvoiceNumber = oLastInvoiceNumber + 1 Dim oWriter As New System.IO.StreamWriter(FILE_NAME) oWriter.Write(CStr(oInvoiceNumber)) oWriter.Close() oGet_Invoice_Number = oInvoiceNumber End If Catch ex As Exception MsgBox(ex.Message) End Try
|VB net, code to modify xlsx file, and errors when it is ran on NON-developer PC...||2||36|
|MYSQL responding very slow||3||21|
|vb.net Configuration, settings file location?||8||29|
|Need Help I cannot Get a User's Group Memberships to display and Of course I can't get Global OU Group to display using Active Directory and VB.NET 2017||3||19|