Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,565 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,889 people online right now. Registration is fast and FREE... Join Now!




sub procedure problems

 
Reply to this topicStart new topic

sub procedure problems, I have to convert fahrenheit to celsius

pzeller
4 Apr, 2008 - 08:21 AM
Post #1

New D.I.C Head
*

Joined: 4 Apr, 2008
Posts: 2

I know I shouldn't expect you to help with my homework ... I've tried and tried and tried ... I thought I understood sub procedures but I keep getting an "expression is not an array or a method, and cannot have an argument list". I placed a Sub Procedures called Temp, I called out the Dim's in it and assigned the mathematical equation to the C variable but the 9 in the 5 divided by 9 is erroring with the above statement.

Can someone help me?

Here is my sub code and the calcButton code ...
Private Sub Temp()
Dim F As Decimal
Dim C As Decimal
Dim isConverted As Boolean
C = 5 / 9(F - 32)
isConverted = Decimal.TryParse(FahrTextBox.Text, F)

celsiusLabel.Text = C.ToString

End Sub


Private Sub calcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles calcButton.Click

Call Temp()
Call Clear()
End Sub





I really would be ok with a hint or two about what the error is talking about. I'm just a beginner in VB05.

Thanks,
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Sub Procedure Problems
4 Apr, 2008 - 08:32 AM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
Are you sure that VB.Net understands that when you write 9(F-32), you actually mean 9 * (F-32)? I could see it throwing an error because it didn't understand that.
User is offlineProfile CardPM
+Quote Post

pzeller
RE: Sub Procedure Problems
4 Apr, 2008 - 09:42 AM
Post #3

New D.I.C Head
*

Joined: 4 Apr, 2008
Posts: 2

QUOTE(pzeller @ 4 Apr, 2008 - 09:21 AM) *

Oh my ... that was it ... Thank you so much.

The teacher left out that little part of the equation.

Peg

I know I shouldn't expect you to help with my homework ... I've tried and tried and tried ... I thought I understood sub procedures but I keep getting an "expression is not an array or a method, and cannot have an argument list". I placed a Sub Procedures called Temp, I called out the Dim's in it and assigned the mathematical equation to the C variable but the 9 in the 5 divided by 9 is erroring with the above statement.

Can someone help me?

Here is my sub code and the calcButton code ...
Private Sub Temp()
Dim F As Decimal
Dim C As Decimal
Dim isConverted As Boolean
C = 5 / 9(F - 32)
isConverted = Decimal.TryParse(FahrTextBox.Text, F)

celsiusLabel.Text = C.ToString

End Sub


Private Sub calcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles calcButton.Click

Call Temp()
Call Clear()
End Sub





I really would be ok with a hint or two about what the error is talking about. I'm just a beginner in VB05.

Thanks,


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:49PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month