Excel Addin to save cell value in database periodically

pp2me11

New Member
Joined
Sep 18, 2015
Messages
1
I have created an Excel Addin in VBA which reads a cell value and save in SQL database.
In Addin, I have created a VBA function SubmitCellValue in a module which can be called as =SUBMITCELLVALUE(A7) in excel and save value from A7 in database.

Above part is working fine, Now I want to add a timer of 15 minute so that after every 15 minutes value from A7 is saved in database.

I tried using Application.OnTime but its not invoking the SubmitCellValue. Code in Module is as below:

Dim SchedRecalc As Date

Function SubmitCellValue(CellValue As Double)
SchedRecalc = Now + TimeValue("00:15:00")
Application.OnTime SchedRecalc, "'SubmitPNL " & CellValue & " '"


End Function

Can anybody suggest what I am doing wrong.
 

Forum statistics

Threads
1,085,986
Messages
5,387,116
Members
402,044
Latest member
Hidalgo

Some videos you may like

This Week's Hot Topics

Top