G
Guest
hiya, have a form which has approx 200 buttons on it to book things in and
out, each button is linked seperate macros to insert the time, and the paste
special it so that it dosnt change when the next save is hit
is their a way to run one single macro, that will be able to tell the
location of the pressed button (col \ row) and insert the time or do they
need to be done individualy,
it would also be handy if their was any way of getting the macro to read the
vehicle name ,, so the message box would read ," confirm vehicle 10" when
clicked on line 10 ??
thanks
Sub macro1g1()
If MsgBox("Confirm Vehicle 1 On Site", vbOKCancel) = vbCancel Then Exit
Sub
Application.ScreenUpdating = False
Sheets("slide 1").Select
Range("C4").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("C4").Select
Selection.NumberFormat = "h:mm"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet2").Select
End Sub
out, each button is linked seperate macros to insert the time, and the paste
special it so that it dosnt change when the next save is hit
is their a way to run one single macro, that will be able to tell the
location of the pressed button (col \ row) and insert the time or do they
need to be done individualy,
it would also be handy if their was any way of getting the macro to read the
vehicle name ,, so the message box would read ," confirm vehicle 10" when
clicked on line 10 ??
thanks
Sub macro1g1()
If MsgBox("Confirm Vehicle 1 On Site", vbOKCancel) = vbCancel Then Exit
Sub
Application.ScreenUpdating = False
Sheets("slide 1").Select
Range("C4").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("C4").Select
Selection.NumberFormat = "h:mm"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet2").Select
End Sub