Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing string variable value within Sub
#7
Error: I don't know German Wink

I am not seeing where wrong data is being passed.

but since when does a program judge data?

Here's a Type error for you, I think that is what you are looking for.
Code: (Select All)
'Beispiel fuer falsche Uebergabe an Prozedur/Funktion - 24. Feb. 2025

Option _Explicit

Declare Function Beispiel(kilowatt As Double) As Double

Dim As Double eingabe
Dim eingabe1$

Print
Print "Kilowatt in PS"
Print: Print

Input "Kilowatt eingeben: ", eingabe1$
Print
Print Using "Das sind ###.## PS"; Beispiel(eingabe1$)


Function Beispiel (kilowatt As Double)

    Dim As Double ps

    ps = kilowatt * 1.36
    Beispiel = ps

End Function
b = b + ...
Reply


Messages In This Thread
RE: Changing string variable value within Sub - by bplus - 02-25-2025, 09:36 PM



Users browsing this thread: 18 Guest(s)