Hi Mr. Excel,
I was using your book "Excel 2010 VBA and Macros" in which I was in 1st Chapter where I am trying to import a file invoice.txt using the macro I am recording.
I am not seeing the code which is importing but all others are fine.
I am only able to see the following code, can you help me why the code for importing the file is not being recorded.
Sub ImportInvoice()
'
' ImportInvoice Macro
' Does import of file
'
' Keyboard Shortcut: Ctrl+i
'
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
Range("A20").Select
ActiveCell.FormulaR1C1 = "Total"
Range("D20").Select
ActiveWindow.SmallScroll Down:=-21
Range("E20").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-18]C:R[-1]C)"
Range("E20").Select
Selection.Copy
Range("F20:G20").Select
Application.CutCopyMode = False
Range("E20").Select
Selection.AutoFill Destination:=Range("E20:G20"), Type:=xlFillDefault
Range("E20:G20").Select
Rows("1:1").Select
Selection.Font.Bold = True
Rows("20:20").Select
Selection.Font.Bold = True
Cells.Select
Range("H11").Activate
Selection.Columns.AutoFit
Range("L18").Select
End Sub
I was using your book "Excel 2010 VBA and Macros" in which I was in 1st Chapter where I am trying to import a file invoice.txt using the macro I am recording.
I am not seeing the code which is importing but all others are fine.
I am only able to see the following code, can you help me why the code for importing the file is not being recorded.
Sub ImportInvoice()
'
' ImportInvoice Macro
' Does import of file
'
' Keyboard Shortcut: Ctrl+i
'
Selection.End(xlDown).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
Range("A20").Select
ActiveCell.FormulaR1C1 = "Total"
Range("D20").Select
ActiveWindow.SmallScroll Down:=-21
Range("E20").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-18]C:R[-1]C)"
Range("E20").Select
Selection.Copy
Range("F20:G20").Select
Application.CutCopyMode = False
Range("E20").Select
Selection.AutoFill Destination:=Range("E20:G20"), Type:=xlFillDefault
Range("E20:G20").Select
Rows("1:1").Select
Selection.Font.Bold = True
Rows("20:20").Select
Selection.Font.Bold = True
Cells.Select
Range("H11").Activate
Selection.Columns.AutoFit
Range("L18").Select
End Sub