Forum Discussion

Rose G's avatar
Rose G
Copper Contributor
Mar 31, 2018
Solved

How to create date stamp by using command box on multiple selected cells ?

Hi. I’m a beginner to Macro & VBA . I want to create a date stamp by using ActiveX Command box, which should work in such a way that when I selected multiple cells, the date should be appear when I click the Command box. Can someone please suggest me tips or idea.

 

 

  • Try linking this simple macro to your command button:

     

    Sub Test()
        Selection.Value = Format(Now(), "MM/DD/YYYY hh:mm")
    End Sub
    

3 Replies

  • Matt Mickle's avatar
    Matt Mickle
    Bronze Contributor

    Try linking this simple macro to your command button:

     

    Sub Test()
        Selection.Value = Format(Now(), "MM/DD/YYYY hh:mm")
    End Sub
    
    • Rose G's avatar
      Rose G
      Copper Contributor

      Thanks a lot; it is working as i expected. I appreciate your help 

Resources