Excel VBA Macro to Display Message at a specific time -


really simple question here, can tell me why code display message in morning doesn't work? can't see why not working should simple!

sub setalarm()     application.ontime timevalue"09:30:00", "displayalarm" end sub  sub displayalarm()     msgbox "good morning" end sub 

try putting sub setalarm in workbook_open() event (please find code below). way sub automatically trigger when open workbook. in order trigger sub displayalarm, workbook needs open @ specified time.

private sub workbook_open()     application.ontime "09:30:00", "displayalarm" end sub 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -