Consulting

Results 1 to 5 of 5

Thread: Solved: How to stop date updating?

  1. #1

    Solved: How to stop date updating?

    I have a sign in register with a date command button that inputs todays date when pressed, problem is how do i stop it from updating say yesterdays to todays date when opended? I need the dates not to update with the system.

    Thanks

  2. #2
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    Hi Paul, you working so much during these days!

    Well, if you convert formula to value you stop updating

    something like[VBA]Range("a1").value=range("a1").value[/VBA]

  3. #3
    Hi ALe

    Slowly getting there

    The onlt problem i have now is the last active cell i input the date into using the command button still updates to the current system date when i open the workbook, all the rest are fine.

    Here is the code i am using

    Private Sub CommandButton1_Click()
    Application.ScreenUpdating = False
    Range("e6:e43").Value = Range("e6:e43").Value
    Range("e30").End(xlUp).Offset(1, 0).FormulaR1C1 = "=TODAY()"
    End Sub


    Thanks

    Paul

  4. #4
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    Private Sub CommandButton1_Click()
    Application.ScreenUpdating = False
    Range("e30").End(xlUp).Offset(1, 0).FormulaR1C1 = "=TODAY()"
    Range("e6:e43").Value = Range("e6:e43").Value

    End Sub

  5. #5
    Your a star ALe, Thank you very much sir!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •