so I'm doing visual studio coding at school and today we were asked to make our own function
Public Class Form1
Dim variableA As String
Dim variableB As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
variableA = InputBox("Enter a number")
variableB = Generate(variableA)
End Sub
Function Generate(ByVal variableA As String, ByRef variableB As String)
variableB = Len(variableA)
variableB = UCase(variableA)
Return variableB
End Function
End Class
the problem is though is the variableB = Generate(variableA) part, it keeps saying
I'm not really sure what it means, I'm just trying to call my function on variableA
EDIT: fixed it by mending
Function Generate(ByVal variableA As String, ByRef variableB As String) to
Function Generate(ByVal variableA As String) but now I'm having trouble with global and local variables, it works though