B
bradikus
I would like to create a delay function such that it's cell or anothe
are changed sometime after the referenced cell is changed, withou
holding up other cell caculations during the delay.
I have tried the following code but still no go.
Code
-------------------
Function DELAY(NewValue As Integer, pauseTime As Integer)
Dim callingRow As Integer
Dim callingCol As Integer
Dim callingSheet As Integer
Dim callVars As String
callingRow = Application.Caller.Row
callingCol = Application.Caller.Column
callingSheet = Application.Caller.Parent.Index
callVars = "change_States " & NewValue & ", " & callingRow & ", " & callingCol & ", " & callingSheet
Application.OnTime Now + TimeSerial(0, 0, pauseTime), callVars
End Function
Sub change_States(NewValue As Integer, callingRow As Integer, callingCol As Integer, callingSheet As Integer)
MsgBox "Look I made it here!!"
Worksheets(callingSheet).Cells(callingRow, callingCol + 1) = NewValue
End Sub
are changed sometime after the referenced cell is changed, withou
holding up other cell caculations during the delay.
I have tried the following code but still no go.
Code
-------------------
Function DELAY(NewValue As Integer, pauseTime As Integer)
Dim callingRow As Integer
Dim callingCol As Integer
Dim callingSheet As Integer
Dim callVars As String
callingRow = Application.Caller.Row
callingCol = Application.Caller.Column
callingSheet = Application.Caller.Parent.Index
callVars = "change_States " & NewValue & ", " & callingRow & ", " & callingCol & ", " & callingSheet
Application.OnTime Now + TimeSerial(0, 0, pauseTime), callVars
End Function
Sub change_States(NewValue As Integer, callingRow As Integer, callingCol As Integer, callingSheet As Integer)
MsgBox "Look I made it here!!"
Worksheets(callingSheet).Cells(callingRow, callingCol + 1) = NewValue
End Sub