Guys, i need your helps!
I'm a newbie in VB language. I have a code with an error which i can't resolve it:
This code give an error from this lines:
Public Function Weekday(DateValue As Date, [DayOfWeek As Microsoft.VisualBasic.FirstDayOfWeek = FirstDayOfWeek.Sunday]) As Integer' has no type parameters and so cannot have type arguments.
And this lines:
'Date' is a type and cannot be used as an expression
'.' expected.
'Timer' is a type and cannot be used as an expression
Help me guys pls!
And sry for my bad english if you guys can't understand some place!
I'm a newbie in VB language. I have a code with an error which i can't resolve it:
Code:
Private Sub UserForm_Initialize()
If Weekday(Of Date)() = 1 Then Scrl_Неделя.Value = 7 Else _
Scrl_Неделя.Value = Weekday(Of Date)() - 1
Txt_Обычный.Text = 0
Txt_Оптовый.Text = 5
Txt_Льготный.Text = 10
TxtПорог.Text = 100
TxtПн.Text = 0
TxtВт.Text = 1
TxtСр.Text = 2
TxtЧт.Text = 3
TxtПт.Text = 4
TxtСб.Text = 5
TxtВс.Text = 6
TxtСкидка1.Text = 2
Dim DtmSegodnya As Date
Dim DtmSejchas As Date
DtmSegodnya = Date
DtmSejchas = Timer
TxtДата.Text = FormatDateTime(DtmSegodnya, vbShortDate)
TxtВремя.Text = FormatDateTime(DtmSejchas, vbLongTime)
End Sub
Code:
If Weekday(Of Date)() = 1 Then Scrl_Неделя.Value = 7 Else _
Scrl_Неделя.Value = Weekday(Of Date)() - 1
Quote:
Public Function Weekday(DateValue As Date, [DayOfWeek As Microsoft.VisualBasic.FirstDayOfWeek = FirstDayOfWeek.Sunday]) As Integer' has no type parameters and so cannot have type arguments.
Code:
DtmSegodnya = Date
DtmSejchas = Timer
Quote:
'Date' is a type and cannot be used as an expression
'.' expected.
'Timer' is a type and cannot be used as an expression
And sry for my bad english if you guys can't understand some place!