L Lutz99999 New Member Licensed User Longtime User Jan 31, 2013 #1 Hello, how can ich change the text from the code module to the Main. Code in the Main Sub Process_Globals Dim txtFehlerspeicher As EditText end sub Sub Globals end sub in the CodeModule Public Sub TextinsTextfeld(was As String) If was.Length =0 Then Main.txtFehlerspeicher.Text ="" Return End If Main.Fehlerspeicher.Text = CRLF & Main.txtFehlerspeicher.Text & was End Sub but it doesn't work... please help Greetings Lutz
Hello, how can ich change the text from the code module to the Main. Code in the Main Sub Process_Globals Dim txtFehlerspeicher As EditText end sub Sub Globals end sub in the CodeModule Public Sub TextinsTextfeld(was As String) If was.Length =0 Then Main.txtFehlerspeicher.Text ="" Return End If Main.Fehlerspeicher.Text = CRLF & Main.txtFehlerspeicher.Text & was End Sub but it doesn't work... please help Greetings Lutz
klaus Expert Licensed User Longtime User Jan 31, 2013 #2 You cannot declare activity objects in Process_Globals ! You cannot access activity objects directly from a code module ! You must declare the EditText in Globals. And transfer the EditText view to the code module in the calling routine. Main module: Code: Copy Sub Globals Dim txtFehlerspeicher As EditText End Sub . . . Test.TextInsFeld(txtFehlerspeicher, "abc") and in the code module Test: Code: Copy Public Sub TextInsFeld(edt As EditText, was As String) If was.Length =0 Then edt.Text ="" Return End If edt.Text = CRLF & edt.Text & was End Sub Are you really want this : edt.Text = CRLF & edt.Text & was and not this : edt.Text = edt.Text & CRLF & was Best regards. Upvote 0
You cannot declare activity objects in Process_Globals ! You cannot access activity objects directly from a code module ! You must declare the EditText in Globals. And transfer the EditText view to the code module in the calling routine. Main module: Code: Copy Sub Globals Dim txtFehlerspeicher As EditText End Sub . . . Test.TextInsFeld(txtFehlerspeicher, "abc") and in the code module Test: Code: Copy Public Sub TextInsFeld(edt As EditText, was As String) If was.Length =0 Then edt.Text ="" Return End If edt.Text = CRLF & edt.Text & was End Sub Are you really want this : edt.Text = CRLF & edt.Text & was and not this : edt.Text = edt.Text & CRLF & was Best regards.
L Lutz99999 New Member Licensed User Longtime User Feb 1, 2013 #3 Thanks for the Answer. In .net i can to and from Module jumping. then i must take your method. Thanks Lutz:sign0188: Upvote 0
Thanks for the Answer. In .net i can to and from Module jumping. then i must take your method. Thanks Lutz:sign0188: