Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I save all the data of each invoice in one row of my DATA sheet. Belo is my sub doing that. In fact, it is much bigger, I truncated it a bi in this example. I offset one column for each individual data of the invoice. I suspect that: ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("L12") is not the ultimate way of doing it. But it is working fine. I jus want to improve my coding as much as I can. Any suggestions? Thanks! Alain Sub Save_And_New_Invoice() Dim Line Application.ScreenUpdating = False Sheets("Data").Visible = True Sheets("Data").Select Line = LastLine(Sheets("Data")) Range("A1").Select ActiveCell.Offset(Line, 0).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("L6") ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("L12") ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("E12") ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("E13") ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = Sheets("invoice").Range("E14") Range("A1").Select Sheets("Invoice").Select ActiveWorkbook.Save Sheets("Data").Visible = False Application.ScreenUpdating = True Application.Run "New_Invoice" End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
How can I set the tab to improve navigation in Excel? | Setting up and Configuration of Excel | |||
Help improve mySchedule Please | Excel Discussion (Misc queries) | |||
How can improve this formula? | Excel Worksheet Functions | |||
Need to improve a formula | Excel Worksheet Functions |