Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am using VB 2008 for dummies and i am on page 72 i do not know how to do the inherits class can any one tell me how? here is what it says word for word from the book "You need a default value for the number of days. If the user doesn’t add anything
in the text box, the application must be able to set the interval value
to something. For now, define a new variable in the Code View. Under the
Inherits class definition, add a dimension statement like the following:
Dim DateInterval As Integer = 7"

That's probably a leftover from VS 2003 for Dummies. The Inherits line is normally hidden from you. Just place the Dim under the Public Class line (unless there's an Inherits line just below that Public Class).

ok thanks i did that thank but still it is saying erro
Public Class DateCalc
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateChooser.ValueChanged
If DateNumber.Text.Length > 0 Then
DateInterval = CInt(DateNumber.Text)
End If
NextWeek.Text = DateChooser.Value.AddDays(DateInterval).ToString()
End SubPrivate Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextWeek.Click
Dim DateInterval As Integer = 7
End SubPrivate Sub DatePicker_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateNumber.TextChanged
End Sub
End Classthe bold words come up with an error saying:
Error 1 Name 'DateInterval' is not declared. line 5 column 13
Error 2 'DateInterval' is a type and cannot be used as an expression line 7 column 51this is how it is set up, any ideal what it is i am doing wrong?

I was not but i happen to get the on the VB for web site and that author of the book had notice that as and error and posted were to put it thanks for the help here

![]() |
Renaming a directory of f...
|
Simple Batch File
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |