Hallo zusammen,
hab da ein kleines Problem und ich versteh nicht ganz, wo der Fehler liegt.
Hab eine Variable totalClaim als Variant deklariert. Dieser Variable möchte ich einen Double-Wert zuweisen. Beim Ausführen des Skriptes kommt es aber zu der Fehlermeldung "Variant enthält keinen Container". Habt ihr eine Idee, woran das liegt?
Dim totalClaim As Variant
Dim newRest As Double
totalClaim = newRest
Danke schon mal..
Gruß Katja
Anbei mal der Code drum herum:
Dim totalClaim As Variant
Dim approvedClaim As Variant
Dim newApproved As Double
Dim newRest As Double
Dim gesamt As Double
gesamt = 30
totalClaim = newRest
approvedClaim = newApproved
If checkClaim(totalClaim(0), approvedClaim(0), gesamt) Then
...
End If
Bis zur If-Abfrage funktioniert alles. Nur dort geht der dann nicht rein, weil angeblich nix im Variant drin ist. In den Variablen newRest und newApproved sind aber definitiv Werte enthalten.