![]() CSV to the filenameĪctiveWorkbook.SaveAs FileName:=FileNameA & ". '// Save the file - Remember need to append. '// If it does, then append a _000 to the nameįileNameA = CurrentDir & JournalRef & Format$(iTemp, "_000") '// Otherwise it'll continue after the LOOP statementĭo While Dir(FileNameA & ".CSV") vbNullString '// If it does, it'll fall into the Do.Loop '// it has to be added back in when doing DIR and Saving '// make the logic easier to code - so that means '// The ".CSV" has been split from the filename to It comes as both a free utility which is able to manage the bulk rename operation for you as well as advanced features which allow you to customize the namechanger for both regular and archive files. '// Changes start here - lines above just to 'place' the code NameChanger software helps to automatically change the name of an entire disk set quickly and efficiently. MsgBox "You have no records, no csv file to create"Ĭode Rows(recordnumber + 1 & ":31").Select MsgBox "Your journal doesn't currently validate" & Chr(13) & validate & Chr(13) & "CSV file NOT created, please validate journal before trying again" MsgBox "File " & filenamea & " created, this can be imported into QL using the Standard GL Journal type (Please remember to change the date format to dd/mm/yyyy when importing)" Video of the Day Step 2 Open the header or footer. Go to the Page Layout tab, click 'Breaks,' and then click 'Next Page' under Section Breaks. Selection.NumberFormat = Details").SelectĪctiveWorkbook.SaveAs FileName:=filenamea, _ Image Credit: Photo courtesy Microsoft Place the cursor on the page of the document where you want to start numbering. Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ If printoption = 6 Then Copies:=1, Collate:=True Printoption = MsgBox("Do you want to print your journal", vbYesNo, "Print Journal") MsgBox "You already have a file titled " & filenamea & ", so please can you enter a different journal reference" & Chr(13) & "Unable to create CSV file"ĪctiveSheet.Protect Password:="gavjournal", DrawingObjects:=True, Contents:=True, Scenarios:=TrueĪctiveWorkbook.Protect Password:="gavjournal", Structure:=True, Windows:=False If validate "Basic validation passed" Then GoTo validateagainĪctiveCell.Formula = "=COUNTIF('Validation'!R2:R31,""Record"")"ĪctiveCell.Formula = "=CELL(""filename"")"įilenamea = currentdir & journalref & ".csv" Code Function FileThere(FileName As String) As Boolean
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |