|
-
Nov 20th, 2003, 02:37 PM
#1
Thread Starter
Member
Calling lines of information **Solved!**--"AHHA"
How can I create a form that I can call information from? such as
Blah_doStuff
=========================
Blah_doStuff
label.caption= "stuff"
text.text="im text"
=========================
you know what I mean?
But not in the same Sub.. calling from another sub....
or callign information for a module... using VB 6.0
Last edited by scroll; Nov 20th, 2003 at 10:48 PM.
--
"If it Stinks Throw it Out" --Scroll
-
Nov 20th, 2003, 02:38 PM
#2
Sorry but that doesnt make any sense.
-
Nov 20th, 2003, 02:42 PM
#3
Thread Starter
Member
I have a bunch of stuff... that I want to reapeat....
set_labels_to_stuff
and somewhere else in the form there will be a list of stuff
that "set_labels_to_stuff" will do
set_labels_to_stuff=
=====================
Set a Label
Change a Picture
Change A Textboc
=====================
SO when it reads "set_labels_to_stuff" it do the following stuff
--
"If it Stinks Throw it Out" --Scroll
-
Nov 20th, 2003, 03:24 PM
#4
Sorry, but that still doesn't make sense.
-
Nov 20th, 2003, 03:30 PM
#5
Evere heared of a Subroutine?
VB Code:
Public Sub stufftodo
the stuff you want to do
End Sub
-
Nov 20th, 2003, 03:35 PM
#6
On a Form, place a TextBox, Lable and a CommandButton:
VB Code:
Option Explicit
Private Sub Form_Load()
Text1.Text = "Start"
Label1.Caption = "Stop"
End Sub
Private Sub Command1_Click()
If Text1.Text = "Start" Then Label1.Caption = "Start"
End Sub
Is that what you mean.
Bruce.
-
Nov 20th, 2003, 03:38 PM
#7
Hyperactive Member
Please ...rephrase your request into something with less "stuff" in it 
something like...
I want to change the Captions of all my labels to "Blah,blah"
and also to fill with defaults some textboxes...
but also...try to write a Before and an After the procedure that you want.
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Nov 20th, 2003, 03:45 PM
#8
I'm on the same wavelenghth pal (I think so ). Like:
VB Code:
Select Case Label1.Caption
Case "Stuff 1"
'Load Picture X
'Cange TextBox X
Case "Stuff 2"
'Load Picture Y
'Cange TextBox Y
Case "Stuff 3"
'Load Picture Z
'Cange TextBox Z
End Select
Once the Label1 has had a Caption set, then down at the Select Case will do actions based on the Caption.
Bruce.
-
Nov 20th, 2003, 10:36 PM
#9
i think he wants to make a function, or just a sub routine like mentioned before..
VB Code:
Private Sub Form_Load()
'do stuff
doStuff
End Sub
Private Sub Command1_Click()
'do stuff again
doStuff
End Sub
Private Function doStuff()
label1.Caption = "caption"
text1.Text = "text"
End Function
-
Nov 20th, 2003, 10:48 PM
#10
Thread Starter
Member
AHHA
AHHA..... Thanks but I figured it out.....
All I had to do was create my own functions....
thanks for trying anyway!
--
"If it Stinks Throw it Out" --Scroll
-
Nov 20th, 2003, 10:51 PM
#11
Wait 
If your NOT returning something (as in a Function), then use a Sub!
Functions should Return, Subs don't.
EDIT: I was way way off (to your original post), sorry 
Bruce.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|