ActiveCell.FormulaR1C1 = "spring"
ActiveCell.Offset(1, 0).Range("a1").Select
Sub Refresh()
NumberOfPayments = Range("c6").Value
Range("a18:e18").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Clear
If NumberOfPayments > 1 Then
Range("a17").Resize(NumberOfPayments , 5).Select
Selection.FillDown
End If
Range("c6").Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = Range("c6").Address Then
Call Refresh
End If
Application.EnableEvents = True
End Sub
Private Sub FillTheBlanks()
'
' FillTheBlanks Makro
'
'
Range("a1").CurrentRegion.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
End Sub
ChDrive "c"
ChDir "C:\Reports"
ChosenFile = Application.GetOpenFilename(("Text Files (*.txt), List*.txt, Important,*List*.txt"), , , , False)
Private Sub AddToList()
Range("a1").CurrentRegion.Copy
Sheets("Zamówienia").Select
Range("a1048576").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Sheets(1).Delete
End Sub
Select range
Range("a4").CurrentRegion.Select
Range(Cells(4, 1), Cells(sheets.Count+2, 1)).Select
Range("a4").Resize(Sheets.Count - 1, 1).Select
Range(Range("a4"), Range("A4").End(xlDown)).Select
Range(Range("a4"), Range("a1048576").End(xlUp)).Select
Range(Range("a4"),range("a4").Offset(sheets.Count-2,0)).Select
Dim wsk As Workbook
Dim ast As Worksheet Dim rng As Range
Set wsk = ActiveWorkbook
Debug.Print wsk.Name
Set ast = wsk.Sheets(1)
Debug.Print ast.Name
Set rng = ast.Range(Range("a1"), Range("a1048576").End(xlUp))