hi , A simple question I hope. I simply want to save a variable after it has met a criteria so it can be accessed later. The current code (below) overwrites it. I want cheese to be saved somewhere and not overwritten. The dict does not work either.
If y_max > y Then
cheese = y_max
Dim dict As Object
Dim i As Long, iMax As Long
Dim v As Variant
Set dict = CreateObject("Scripting.Dictionary")
dict.Add inputer, y_max
'Debug.Print dict.Items
End If
If Not IsNull(cheese) Then
Debug.Print "CHEESE" & cheese
End If