[Dba-office] Excet Table with VBA

John R Bartow jbartow at winhaven.net
Fri Dec 18 12:00:40 CST 2015


This is the only simple code I have that came to mind:

Sub SetNewYear()
' This changes the year at the top row cell
	Dim intYear As Integer
	intYear = Range("N1").Value + 1 'set the new year
	Range("N1").Value = Year(Now())  'change the cell value
End Sub

If you designate the start of the row as the range I suppose that might do
it.



More information about the Dba-office mailing list