473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Visual Basic 2005 Question

2
I need some help for VB.

When i press Play, it keeps comes out with Error.
I know where i got it wrong but don't know what to put it.

"dPeopleLivingHouse = CDbl(txtPeopleLivingHouse8KWH.Text)"

this bit is wrong. (CDbl)

can anyone help me ?

Expand|Select|Wrap|Line Numbers
  1. Public Class frmGreenEarthEnergy
  2.  
  3.     Const dPeopleLivingHouse8KWH As Integer = 8
  4.  
  5.     Private Sub bntExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntExit.Click
  6.  
  7.         Me.Close()
  8.  
  9.     End Sub
  10.  
  11.     Private Sub bntCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntCalc.Click
  12.  
  13.  
  14.         Dim dPeopleLivingHouse As Integer
  15.         Dim dPeopleLivingHouse8KWH As Integer
  16.         Dim dHotWater As Boolean
  17.         Dim dPoolFilter As Boolean
  18.         Dim dDeilingInsulation As Boolean
  19.         Dim dAirConditioning As Double
  20.         Dim dElectricHeater As Integer
  21.         Dim dRvVideo As Double
  22.         Dim dDishwasher As Integer
  23.         Dim dFreezer As Boolean
  24.         Dim dRefrigerator As Boolean
  25.         Dim dElectricStovetop As Boolean
  26.         Dim dElectricOven As Boolean
  27.         Dim dComputerPrinter As Double
  28.         Dim dWashingMachine As Integer
  29.         Dim dDryer As Integer
  30.         Dim dSpa As Double
  31.         Dim dElectricityPlan As String
  32.  
  33.         dPeopleLivingHouse = CDbl(txtPeopleLivingHouse8KWH.Text)
  34.  
  35.         dPeopleLivingHouse = dPeopleLivingHouse * dPeopleLivingHouse8KWH
  36.         lblPeopleLivingHouse.Text = dPeopleLivingHouse
  37.     End Sub
  38. End Class
Apr 7 '08 #1
1 859
debasisdas
8,127 Expert 4TB
Question moved to .NET forum.
Apr 8 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dr. Zharkov | last post by:
Hello. To see the graphics of technology DirectX 9.0 SDK Update - June 2005 in project Visual Basic, WindowsApplication1 from Visual Studio 2005 Beta 1, in file My Project, MyApplication.vb in a...
2
by: elnahrawi | last post by:
Download ebook http://books-download.com/?Book=1487-Visual+Basic+2005+Jumpstart Okay, all you VB6 developers--time's up. As of March 2005, Microsoft no longer supports this version of Visual...
4
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, ...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
1
by: FlyingBuckner | last post by:
All right be kind, this is my first question on a forum. I need help on selecting the right software to purchase. I have a database set up using Access, 6 users. It is split into Tables and...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.