MrLarrExcel
New Member
- Joined
- Apr 26, 2016
- Messages
- 7
Hello everyone,
New to the forum and kinda new to the excel VBA but I know more about VB.
First I will say I work in steps meaning this question may be leading to something bigger.
Im using 2016 Pro Plus.
My goal here:
Not necessarily using the code I am providing, I wish to compare 2 cells with numeric data and if one is more that the other than give a Boolean expression of 1 else 0 in another totally separate cell. Also this needs to be done repeatedly over a specific amount of seconds by automation without any user intervention. That's all.
So far with the code I am using I am getting an error:
"Cannot run the macro 'Path to macro'. The macro may not be available in this workbook or all macros may be disabled."
I have confirmed from the Trust Center that the macros are enabled and the Trust access to the VBA project object model was checked.
The code is in the sheet.
Thank You For any help!
New to the forum and kinda new to the excel VBA but I know more about VB.
First I will say I work in steps meaning this question may be leading to something bigger.
Im using 2016 Pro Plus.
My goal here:
Not necessarily using the code I am providing, I wish to compare 2 cells with numeric data and if one is more that the other than give a Boolean expression of 1 else 0 in another totally separate cell. Also this needs to be done repeatedly over a specific amount of seconds by automation without any user intervention. That's all.
So far with the code I am using I am getting an error:
"Cannot run the macro 'Path to macro'. The macro may not be available in this workbook or all macros may be disabled."
I have confirmed from the Trust Center that the macros are enabled and the Trust access to the VBA project object model was checked.
The code is in the sheet.
Thank You For any help!
Code:
Option Explicit
Sub SaveData()
Application.OnTime Now + TimeValue("00:00:10"), "FormTimer"
End Sub
Sub FormTimer()
Dim score1 As Integer, score2 As Integer, result As String
score1 = Range("B18").Value
score2 = Range("N14").Value
If score1 > score2 Then
result = 1
Else
result = 0
End If
Range("n16").Value = result
MsgBox "yea"
Call SaveData
End Sub