|
I want an input from UserForm1 to be a Number.
I want to carry that number into UserForm2.
If, say that figure was 3, then I want either...
Three TextBoxes to open/be visible, OR
I want to ask for input on the Same TextBox 3 times, assigning each value to an array.
What I have at the mo is this...
UserForm one has a Text box asking for tbNumberOfUnits, and an Enter Button.
On Enter it checks that the value is a number not text, throws exception.
Assuming it is ok, it calls UserForm2 by "UserForm2.Show"
There is a CommandButton Begin on UserForm2
At this point I would like the value of tbNumberOfUnits to be called, but it appears not to exist in UserForm2.
Also, How do I create TextBoxes to the Desired amount?
Any help/pointers would be appreciated, I have checked a couple of books and can't seem tofind what I want, and also feel I may not be asking the right questions from Google.
------------------------------------
We hang the petty thieves and appoint the great ones to public office.
- Aesop
|
|
|
|
|
Hi,
Based on my understanding you want to pass value from one form and generate textbox dynamically.So you can have a global variable and store value in tat variable from userform1.and in the page load of userform2 generate as number of textboxes dynamically using for loop.Otherwise get input as many times and get in an array.Store the values in the DB by using arr(0),arr(1)... like that.
pls free to ask again if i have misunderstood your problem.
Believe!Success is always yours.
|
|
|
|
|
That is it in a nutshell.
------------------------------------
We hang the petty thieves and appoint the great ones to public office.
- Aesop
|
|
|
|
|
can you give me your requirement with your code
Believe!Success is always yours.
|
|
|
|
|
I want to know how to make the following
1. What is the best to use for this txt or database.
2. If I have a question eg. "What animal eat grass". It must give me an answer with 1 or more possibilities eg, cow, springbok eg.
3. Then if I have a another question, "What Animal give us milk, it must also show "cow or more it the is.
4. I want to add new questions and answers,
5. A question can have a lot of answers
6. a answer (cow, eg) can have a lot of questions.
7. what is the best way to do this,
8. IS there a sample of how to start this.
|
|
|
|
|
Use the database for storing Data.
label for asking Que.
Checkbox when the ans is more then one.
optionbox when the ans is single.
|
|
|
|
|
Use a text file. That would be funny.
( seriously, use XML or a DB )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thank you, I am going to use a database (Open office).
Do anyone have some sample code on how to start with this program.
|
|
|
|
|
open office ? Why ? You should use SQL Server Express, it's free and it's well supported in .NET.
It's an easy task, you just need to design your DB to associate questions and possible answers, then write code to step through questions.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thank you, I totaly forgot about Sql, did not work with it before,
Can I use Sql when I am finshed with my project, on other Pc that does not have sql on it.
I am new to this, that is why I sam looking for sample code to start me off.
|
|
|
|
|
hendrikbez wrote: Can I use Sql when I am finshed with my project, on other Pc that does not have sql on it.
Shure like Christian said the express edition is free so you can install it on the pc (or include it in your setup to install together with your program)
|
|
|
|
|
Hello,
VS2008 SP1
<br />
Private Function IsPortAvailable() As Boolean<br />
Using sock As New Socket(AddressFamily.InterNetwork, _<br />
SocketType.Dgram, _<br />
ProtocolType.Udp)<br />
sock.Connect(VaxSIPUserAgentOCX.GetMyIP(), 5060)<br />
Return sock.Connected<br />
End Using<br />
End Function <br />
Using this code I thought I had this problem solved. However, after testing I have found that the socket always connects. Even if the port is being used by another application.
The port I am checking is 5060 UDP. My application when it starts will check if this is available. If another applications is using it. i.e. SJ Phone etc. The application will inform the user.
However, the socket always returns true. I have checked this with netstat -aon (cmd) and I can see that the port is being used.
I am checking the port on my local computer. So my IP address is 10.10.10.120. Under the netstat I can see this 0.0.0.0:5060. Why all the zeros. Could this be part of the problem
Is there another method for checking this?
I have looked at udp client, and wondering about winsock.
Thanks,
|
|
|
|
|
How to create VS2008 / Office 2007 style menu (raised selection when mouse focused)
when I create windows application menu the selection comes as flat style
Saseendran Kombath
|
|
|
|
|
You typically need to buy a commercial library to get Office style UI.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Does anyone know of where I can get some help on creating excel addins that connect to a sql 2005 database using VSTO?
|
|
|
|
|
Hai friends,
X=50
Y=100
SendMessage hWND, WM_MOUSEMOVE, 0&, lparam
My question is, how to pass the X, Y to lparam since it accept only one value?
pls help.
|
|
|
|
|
Hi,
typing "WM_MOUSEMOVE" in the Google search box and reading the first hit would have taken less time and less effort than entering your message and waiting for a response...
|
|
|
|
|
Hai,
Yes, the first result really takes in to the MSDN documentation.
but no example is given
what i need is an example and with a short explanation on how to post the values.
tx
|
|
|
|
|
The documentation DOES provide an answer to your question.
MSDN wrote: lParam
The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
lParam = x or (y << 16)
|
|
|
|
|
I'd give this a 5, but post voting is broken for Safari.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
All that remains to be done is you buying a real computer, or Chris fixing the Safari voting bug
|
|
|
|
|
ROTFL - well, if IE was not crap, I'd use IE for CP, in XP, on my Mac.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm happy running FireFox on Vista, except for some companies (banks) and governmental organizations that only support IE.
Did you consider FireFox on Mac?
|
|
|
|
|
I am aware that it exists, but I've never hated Safari like I hate IE, so I've never felt enough motivation to install it. I ran FF on my old PC.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|