Macro button to put date in selected cell within specific column

  • Hi,


    I am a beginner in VBA and I stumbled upon a little problem with my macro. It seems easy, but too difficult for me.


    My macro is supposed to put in a current date in chosen cell when I press a button.
    But only in one column this action can be allowed. Column starting from cell B7 and down to infinity.
    And date should stay what it was when file is open another day.


    This is what I got, based on analysing and copying other macros:


    Code
    Private Sub Date1_Click()ActiveCell.Offset(0, 0).Range("A1").SelectTIME1 = DateActiveCell = TIME1ActiveCell.SelectSelection.NumberFormat = "dd/mm/yyyy"ActiveWorkbook.SaveEnd Sub


    When i put Range("B7:B400"), date appears not in chosen cell.
    Also I don't know wether Offset is a good idea here.


    I'd be very thankful for your help.
    Cheers

  • Try this.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!