Worked on my xl2007 but I may have done it this way.
Sub don()
With ActiveCell
.Value = Time
.NumberFormat = "hh:mm AM/PM"
.Offset(1).Select
End With
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
"walrus417" <walrus417@discussions.microsoft.com> wrote in message
news:C0805D31-F2E3-40B3-8D46-F0EBB649A715@microsoft.com...
>I made a quick macro for my job and it works great on my computer but when
>I
> send it to another machine, there is a complier error. Both Machines are
> using 2007 and the file is saved as a .xlsm
>
> I enabled macros on both machines and other macros I made on the worksheet
> work. So there is just a problem with this one macro when it goes to
> another
> macine. Here is the code:
>
> ActiveCell.Select
> ActiveCell.Formula = Time
> ActiveCell.NumberFormat = "hh:mm AM/PM"
> ActiveCell.Offset(1, 0).Select
>
> That's is. Just a simple code
>
> Any suggestions?