Just starting. 
Author Message
 Just starting.

I have a memory var that is called X.  I have assigned it a value of
"test".  "test" is a var that stores some other data.  I want to assign
a new var that stores the data contained in test.  How do I do that?  I
am new to VB and have not run across a way to do this.  It would be
somewhat similar to putting "!" in front of a field name to retrieve the
value of the field.  Thanks


Sat, 17 Nov 2001 03:00:00 GMT  
 Just starting.
Hello,
    I'm not sure I completely understand your question, but here is what I
can come up with for now. Declare your new variable at type Variant. This
will be able to hold what ever type of data you put in it. Text, Boolean,
Int. and so on. If you want to put the value of test in a new var then Dim
NewVar; NewVar = test. That is about all I can do for you for now. Be a
little more detailed and I might be able to give you more information.

Good Luck



Quote:
> I have a memory var that is called X.  I have assigned it a value of
> "test".  "test" is a var that stores some other data.  I want to assign
> a new var that stores the data contained in test.  How do I do that?  I
> am new to VB and have not run across a way to do this.  It would be
> somewhat similar to putting "!" in front of a field name to retrieve the
> value of the field.  Thanks



Sun, 18 Nov 2001 03:00:00 GMT  
 Just starting.

Ok...Let's see if I can explain this better.  I am going to create a form on
the fly.  Because I may have many "random" forms created, I do not want to
duplicate the formname.  I want to assign a variable we will call it
"form_name" to a random generation.  Let's say the function returns "abc" this
time. I then want to create the form call frmABC by saying set (the value
stored in the var "form_name") = form1.  Instead of creating a form called
form_name.  I hope that explains it better.

Quote:

> Hello,
>     I'm not sure I completely understand your question, but here is what I
> can come up with for now. Declare your new variable at type Variant. This
> will be able to hold what ever type of data you put in it. Text, Boolean,
> Int. and so on. If you want to put the value of test in a new var then Dim
> NewVar; NewVar = test. That is about all I can do for you for now. Be a
> little more detailed and I might be able to give you more information.

> Good Luck




> > I have a memory var that is called X.  I have assigned it a value of
> > "test".  "test" is a var that stores some other data.  I want to assign
> > a new var that stores the data contained in test.  How do I do that?  I
> > am new to VB and have not run across a way to do this.  It would be
> > somewhat similar to putting "!" in front of a field name to retrieve the
> > value of the field.  Thanks



Sun, 18 Nov 2001 03:00:00 GMT  
 Just starting.
You're not coming from the Fox world are you?  What you're talking about is
macro substitution, which VB can't do.

Trying to read b/t the lines, you could do this:

Public Sub CreateForm()
    Dim x As MyForm

    Set x = New MyForm
    x.Show
End Sub

You can call that sub as many times as you wish, and a new form will be
displayed every time.  VB creates the form, adds it to its internal Forms
collection and x goes out of scope.  The form stays on the screen because
the Forms collection still has a reference to it.

VB can't do macro substitution, but it can solve your problem.  What exactly
are you trying to do?

-Andrew



Mon, 19 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. help: text justed in reports access

2. START NUMBER START TO FINISH

3. Problem starting Acces 97 after having started Outlook 2000

4. Start with starting parameters

5. Start a macro automaticly when starting outlook

6. Automatic start an AddIn when Outlook2k starts

7. Macro not starting when starting word 97 with /m command

8. Start program automatically when Windows starts

9. How to start an appliction during start of the computer

10. Office 2000 setup starts when starting VB

11. Start application when another starts

12. start my exe when windows starts

 

 
Powered by phpBB® Forum Software