I am looking for a user defined function which will call a message sub routine using the application.ontime method . I am passing arguments to the function that will execute at a certain time taken from selected cell . But my function doesnt work . I dont understand why. Can anyone help me with the codes and explain why my code dont work.
Function alarm (selectedcell as range)
sc=selectedcell.row
application.ontime Timevalue( cells(sc,1).text)," message"
End function
Sub message()
Msgbox " tested"
end sub
Function alarm (selectedcell as range)
sc=selectedcell.row
application.ontime Timevalue( cells(sc,1).text)," message"
End function
Sub message()
Msgbox " tested"
end sub