Results 1 to 3 of 3

Single use macro in command button

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Single use macro in command button

    Hi guys

    Below is the code assigned to a button for inputing the time when we book a driver out, what I am looking for is a way for the button to only be used once... so if a driver books out at 08:00 then the time wont change if the button is pressed at another time

    Sub Bookout()
    
        ActiveSheet.Unprotect
        ActiveCell.FormulaR1C1 = "=NOW()"
        Range("F3").Select
        Selection.NumberFormat = "h:mm"
        ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
            False
    End Sub
    Thanks for your help
    Last edited by JamesT1; 04-15-2010 at 03:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1