Maybe someone can find it interesting :) Sub MultiplicationTable() Shee1.Select Cells(2, 2).Select 'The first column and row should be frozen ActiveWindow.FreezePanes = True 'Store the current row outside the loop Dim CurrentRow As Long CurrentRow = 2 'Loop till the last row of the selected sheet Do While CurrentRow
when you assign value to the cell, is there any different between cells(xrow,xcol) = num and cells(xrow,xcol).value = num?
No. Both methods will put a value in the respective cells. But the second method is more proper.
Maybe someone can find it interesting :)
Sub MultiplicationTable()
Shee1.Select
Cells(2, 2).Select 'The first column and row should be frozen
ActiveWindow.FreezePanes = True
'Store the current row outside the loop
Dim CurrentRow As Long
CurrentRow = 2
'Loop till the last row of the selected sheet
Do While CurrentRow
very good