|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (4 bit)
|
I want to call another form when I click on a command button. My project is very small so I don't think there's a lot of coding involved(8-10 forms) I don't need any daughter windows and the project will be an executable. Also, I get an "Object Required" error when compiling. Here's a sample code:
General Declarations Dim msg1text as string Dim msg2text as string Dim msg3text as string Dim msg4text as string Form Load msg1.text = "dfasd" msg2.text = "dfasd" msg3.text = "dfasd" msg4.text = "dfasd" Then in CmdText1 msg1.text = "dfasd" msg2.text = "" msg3.text = "" msg4.text = "" Help??? I get the error in CmdText1, msg1 Thanks Duane
Last edited by Nikotnby; 05-08-2001 at 12:19 PM. |
|
|
|
|
|
#2 |
|
SQL nutcase
|
The code you supplied is perfectly fine. The error is probably caused by the fact that you didn't put the text boxes on the form.
also, the Code:
Dim msg1text as string Dim msg2text as string Dim msg3text as string Dim msg4text as string Can you also be more specific when writing your post, it's pretty hard to determine what's wrong with so little information. |
|
|
|
|
|
#3 |
|
Member (4 bit)
|
Mosquito,
Yes, there, indeed, are text boxes on my form. What I want the program to do is when I click on a command button, a message appears in the text box. When I compile and take out the Dim'ed messages, no text appears. Duane
|
|
|
|
|
|
#4 |
|
SQL nutcase
|
Can you mail me the sourcecode, because this way we are getting nowhere.
|
|
|
|
|
|
#5 |
|
Member (9 bit)
Join Date: May 2000
Location: Lexington, Michigan
Posts: 353
|
this should be simple enough. the following code worked fine for me.
Dim strText1 As String Dim strText2 As String Dim strText3 As String Dim strText4 As String Private Sub Command1_Click() Text1.Text = "e" Text2.Text = " " Text3.Text = " " Text4.Text = " " End Sub Private Sub Form_Load() Text1.Text = "a" Text2.Text = "b " Text3.Text = "c" Text4.Text = "d" End Sub the dim of the strings are not necessary unless you plan to use these variables at some other point. i included them just to match what you were doing.
__________________
Certifiable =========================================== Cisco CCNA,CCDA CompTIA A+, Network+,Inet+,Security+ CIW Associate IBM AIX certified IBM Certified Specialist - p5 and pSeries Administration and Support for AIX 5L V5.3 IBM Certified Systems Expert - p5 and pSeries Enterprise Technical Support AIX 5L V5.3 |
|
|
|
|
|
#6 |
|
Member (4 bit)
|
We must all pay homage to Great_One!!
Thanks Much, I'll have to try it If you need the actual source code, let me know and I'll try and email it Monday Also I have 4 text boxes, 5 command buttons and 4 image boxes on my Form! Duane
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|