There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot browser bsod computer connection cpu crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware missing monitor network networking outlook outlook 2003 outlook 2007 outlook express password popups problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
VB form doesn't depict the changes I make


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Prashanti's Avatar
Computer Specs
Member with 55 posts.
 
Join Date: Apr 2006
Experience: Intermediate
13-Jun-2006, 02:21 AM #1
VB form doesn't depict the changes I make
Hi all !
Here I am with yet another doubt !
I created a form in which there is an oval shape . When I click on one of the option buttons red , blue , green or yellow then the appropriate color should change in the shape. So far so good . It worked just fine . But then I wanted Magenta instead of yellow . Then the prob started .
It does not change the color to magenta . I changed the code accordingly , still it does not change the color . Why not ??
What is Run Time error number 424 Object required ? This also occurs for the same form.

The code is something like this :

'Controls example
'6th June 2006
'By Prashanti
'Description : This project uses labels, _
option buttons,chk boxes,command buttons _
to change properties of text
'Saved In: vbpractice folder in f:


Private Sub chkBold_Click()
'Change the text messagetext to/from bold

lblMessage.Font.Bold = chkBold.Value
End Sub

Private Sub chkItalic_Click()
'Change the text messagetext to/from Italic

lblMessage.Font.Italic = chkItalic.Value

End Sub

Private Sub chkUnderline_Click()
'Change the text messagetext to/from Underline

lblMessage.Font.Underline = chkUnderline.Value
End Sub

Private Sub cmdClear_Click()
'Clear the text controls

With txtName
.Text = "" 'Clear the txt box
.SetFocus 'Reset the insertion point
End With
lblMessage.Caption = ""
txtMessage.Text = ""
End Sub

Private Sub cmdDisplay_Click()
'Display the text in the message area

lblMessage.Caption = txtName.Text & ":" & txtMessage.Text
End Sub

Private Sub cmdExit_Click()
'Exit the project

End
End Sub

Private Sub cmdPrint_Click()
'Print the form

PrintForm
End Sub





Private Sub lblLabel_Click()

End Sub

Private Sub optBlue_Click()
'Make label blue

shpOval.BackColor = vbBlue
lblMessage.ForeColor = vbBlue
End Sub

Private Sub optGreen_Click()
'Make label Green

shpOval.BackColor = vbGreen
lblMessage.ForeColor = vbGreen
End Sub

Private Sub optRed_Click()
'Make label Red

shpOval.BackColor = vbRed
lblMessage.ForeColor = vbRed
End Sub

Private Sub optYellow_Click()
'Make label Yellow

shpOval.BackColor = vbYellow
lblMessage.ForeColor = vbYellow
End Sub

Private Sub txtName_Change()
'Make the label text change


End Sub

I don't have msdn loaded on my sys , so please help .
Genidiot's Avatar
Computer Specs
Member with 46 posts.
 
Join Date: May 2006
Location: Ohio
Experience: Advanced
13-Jun-2006, 11:32 AM #2
The error message you received would indicate that a control is missing on your form. It's hard to say without knowing what line the error was received on, especially since you didn't include the form code. It would also help to mention what version of VB (seems to be VB6, there are at least 3 .Net versions as well) you are using.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:45 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.