Hey guys and gals
I have 2 questions for the board..
VBA excel scripting
1..I want to test if the numerical value of one cell is twice that of another cell..
using "If Range("G43") >= Range("H43")" works fine to test if one is greater than the other..
But how can I check if one is greater than twice the other?
2..Does anyone know how to create a pause in a VB script ? I have tried a few options but they all hang the program...I have tried just putting in a for loop aswell but that didnt work too well
Any help appreciated..
P
2 questions
1. "If Range("G43") >= 2*Range("H43")"
2. Private Declare Sub AppSleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Public Sub PauseApp(PauseInSeconds As Long)
Call AppSleep(PauseInSeconds * 1000)
End Sub
...and in the VB code where you want a "sleep", type
PauseApp 3
2. Private Declare Sub AppSleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Public Sub PauseApp(PauseInSeconds As Long)
Call AppSleep(PauseInSeconds * 1000)
End Sub
...and in the VB code where you want a "sleep", type
PauseApp 3