I know that Hour is a vb defined code, but it gives me an error when i set a variable = hour. why? Code: Dim i i = Hour
Dim i i = Hour
Rate my post if i helped you! Button Configuration Control For VB6 GetAsyncKeyState I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)
The Hour() function requires a Datetime argument. If you're looking for the Hour() as of right now, use the Now() function: i = Hour(Now())
XP Library • System Tray • Sorting arrays • Resize Forms • Chess Openings
Or Code: Private Sub Command1_Click() MsgBox Format(Now, "hh") End Sub
Private Sub Command1_Click() MsgBox Format(Now, "hh") End Sub
Or Code: Dim h as Integer h = Hour(Time)
Dim h as Integer h = Hour(Time)
Don't forget to use [CODE]your code here[/CODE] when posting codeIf your question was answered please use Thread Tools to mark your thread [RESOLVED]Don't forget to RATE helpful posts • Baby Steps a guided tour • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk
Oh. That makes sense. Thanks guys!
yea nice !
Forum Rules