I am expanding on an idea I had last year: How do I get the Cell value in Excel using an environmental variable for a VBA If statement
I want to use data from a license file on-line and data entered into the spreadsheet locally to verify if the license is valid and up to date
I can copy the data I need from the on-line file to the local spreadsheet without any issues and check with normal formula, but I want to avoid doing that
If possible, I'd like to save the data in variables instead to use for verification so that it makes it more difficult for someone to circumvent the protection
Sub Check_Key_Online()
Dim KeyFormula As String
On Error GoTo error
KeyFormula = "='" & "SomeWebsiteURL/[" & Reg1.Range("D9").Value & "]Lic'!$B$6"
With Reg1.Range("G9")
.Formula = KeyFormula
.Value = .Value
End With
MsgBox Reg1.Range("G9").Value = Reg1.Range("D9").Value
GoTo exit1
error:
MsgBox (IsError(KeyFormula))
exit1:
End Sub
The user will enter information, including a key, they key will then be taken to check which file to verify against on-line, once the file has been chosen and found to exist, I'd like the data to be saved in variables to check the validity
PS. Ignore the error handling code, I still have to work on how to handle things if license is not found :P