MD Didarul Islam
New Member
- Joined
- Jul 5, 2018
- Messages
- 2
Sir,
I am creating a Automatic Invoice and i merge some cell for beauty of my Invoice but when i assign a button into macro,
it says the macro can not work for merge cells. So how to save my file to keep merge cells .If you have any solution for that please give me information. Below i mentioned the code for Next invoice
number and for Save file. I note the cod from your You Tube channel .
Sub NextInvoice()
Range("E5").Value = Range("E5").Value + 1
Range("A20:E39").ClearContents
End Sub
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveSheet.Copy
NewFN = "C:\aaa\Inv" & Range("E5").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
Thank You
MD Didarul Islam
I am creating a Automatic Invoice and i merge some cell for beauty of my Invoice but when i assign a button into macro,
it says the macro can not work for merge cells. So how to save my file to keep merge cells .If you have any solution for that please give me information. Below i mentioned the code for Next invoice
number and for Save file. I note the cod from your You Tube channel .
Sub NextInvoice()
Range("E5").Value = Range("E5").Value + 1
Range("A20:E39").ClearContents
End Sub
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveSheet.Copy
NewFN = "C:\aaa\Inv" & Range("E5").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
Thank You
MD Didarul Islam