Hi I am trying to delete rows and columns until the end. In this one i am trying to delete rows 39until the end. I cant figure out why it wont work. Thanks!
Sub TestingModule()
Dim LastRow As Long
LastRow = Cells(1, 1).End(xlDown).Row
Dim LastColumn As Long
LastColumn = Cells(1, 1).End(xlUp).Column
Rows(39:LastRow").Delete
'Columns("39:LastColumn").Delete
Dim Msgbx As Double
Testt = LastRow
Msgbx = MsgBox(Testt, vbOKOnly, "Test")
End Sub
Sub TestingModule()
Dim LastRow As Long
LastRow = Cells(1, 1).End(xlDown).Row
Dim LastColumn As Long
LastColumn = Cells(1, 1).End(xlUp).Column
Rows(39:LastRow").Delete
'Columns("39:LastColumn").Delete
Dim Msgbx As Double
Testt = LastRow
Msgbx = MsgBox(Testt, vbOKOnly, "Test")
End Sub