Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro on Mac OSX
Someone on another group graciously supplied this macro to me this
morning. It deposits the date and time into a cell and flashes up a message box warning the user if it is after time X (in this case, 12 noon). My problem is that, while the macro runs and deposits the time into the active cell just great, the message box does not appear. (At the time I ran the tests, it was already past noon.) Since I'm running this in Excel X for mac, I thought perhaps someone here might know of a mac issue that's keepiing this from working all the way. Thank you! Sub NewDateAndTime() Dim mPrompt As String Dim mBoxStyle As Long Dim mTitle As String Dim mMsg As Variant mPrompt = "It's past 12:00 PM!" mBoxStyle = 16 ' vbCritical mTitle = "Warning!" With ActiveCell .Value = Now .NumberFormat = "mm/dd/yy h:mm AM/PM" If Now Mod 1 12 / 24 Then ' 12/24 = 12:00 PM mMsg = MsgBox(mPrompt, mBoxStyle, mTitle) .ClearContents End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |