View Single Post
 
Old 08-06-2017, 10:16 AM
DIMI DIMI is offline Windows 7 32bit Office 2007
Advanced Beginner
 
Join Date: Aug 2017
Posts: 37
DIMI is on a distinguished road
Default Does not transfer the words on storage and printing

Good afternoon,
I am stuck in the following, I try to make excel with vba online invoicing. I have configured to convert the numeric amount into words, to print it and save it in excel format on the computer. But when I print it does not display the word (# name?) And when I go to open the saved I noticed that it does not hold the function that converts it to the letter and I will have to define it again. There is a way to keep it in both the original form and the saved archive. I attach part of the code to you.
Thank you.

Sub NextInvoice()
Range("I5").Value = Range("I5").Value + 1
Range("G26").Value = Range("G34")
Range("G30").Value = Range("G34")
Range("G31").MergeArea.ClearContents
Range("G34").MergeArea.ClearContents
Range("G38").MergeArea.ClearContents
Range("G34").Formula = "=G30-G31"

End Sub



Sub SaveInvWithNewName()
Dim NewFN As Variant
ActiveSheet.Copy
NewFN = "C:\invoice\" & Range("I5").Value & Range("H5").Value & Range("I49").Value & Range("F16").Value & ".xlsm"
ActiveSheet.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbookMacroEnabled
Application.DisplayAlerts = True
ActiveWorkbook.PrintOut copies:=2
ActiveWorkbook.Close SaveChanges:=False
NextInvoice
End Sub
Reply With Quote