Click here to Skip to main content
15,889,116 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Encrypted source files Pin
Dave Kreskowiak19-Feb-07 9:33
mveDave Kreskowiak19-Feb-07 9:33 
GeneralRe: Encrypted source files Pin
Fernando A. Gomez F.19-Feb-07 10:43
Fernando A. Gomez F.19-Feb-07 10:43 
QuestionUseing Serial Port Pin
Max Bayne19-Feb-07 8:13
Max Bayne19-Feb-07 8:13 
AnswerRe: Useing Serial Port Pin
Ankur.Bakliwal19-Feb-07 17:35
Ankur.Bakliwal19-Feb-07 17:35 
Questiondisable groupbox Pin
jds120719-Feb-07 7:56
jds120719-Feb-07 7:56 
AnswerRe: disable groupbox Pin
Marcus J. Smith19-Feb-07 8:19
professionalMarcus J. Smith19-Feb-07 8:19 
AnswerRe: disable groupbox Pin
TwoFaced19-Feb-07 8:23
TwoFaced19-Feb-07 8:23 
QuestionCONVERSION OF VB CODE TO JAVASCRIPT Pin
soadfreak19-Feb-07 7:48
soadfreak19-Feb-07 7:48 
Hi I wrote a VB code for automatic date picker,I need to convert the same to Javascript inorder to embbed the same into Infopath.Can you please me in this.Below is the VB code.

Private Sub Cmd_Timer_Click()
Dim a As String
Dim b As Date
b = DTPicker1

'a = day(DTPicker1)
'MsgBox a

If Combo1.Text = Label4.Caption Then
Text1.Text = DTPicker1 + 1
DTPicker1 = Text1.Text
a = Format$(DTPicker1, "dddd")
If a = "Sunday" Then
DTPicker1 = DTPicker1 + 1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
Else
If a = "Saturday" Then
DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
End If
End If
DTPicker1 = b
Exit Sub
End If
If Combo1.Text = Label5.Caption Then
Text1.Text = DTPicker1 + 2
DTPicker1 = Text1.Text
a = Format$(DTPicker1, "dddd")
If a = "Sunday" Then
DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
Else
If a = "Saturday" Then
DTPicker1 = DTPicker1 + 3
'Text1.Text = DTPicker1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
End If
'Text1.Text = DTPicker1 + Text2.Text
End If
DTPicker1 = b
Exit Sub
End If
If Combo1.Text = Label6.Caption Then
For i = 1 To Text2.Text
a = Format$(DTPicker1 + i, "dddd")
If a = "Sunday" Then
DTPicker1 = DTPicker1 + 1
'Text1.Text = DTPicker1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
Else
If a = "Saturday" Then
DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
End If
End If

Next i
'Text1.Text = Format(DTPicker1, "MM/DD/YYYY") + Text2.Text
Text1.Text = Format(DTPicker1 + Text2.Text, "MM/DD/YYYY")
DTPicker1 = b
Exit Sub
End If
If Combo1.Text = Label7.Caption Then
Text1.Text = Format(DTPicker1, "MM/DD/YYYY")
End If
'DTPicker1 = Text1.Text
'a = Format$(DTPicker1, "dddd")
'If a = "Sunday" Then
'DTPicker1 = DTPicker1 + 1
'Text1.Text = DTPicker1
'Else
'If a = "Saturday" Then
'DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
'End If
'End If



End Sub

Private Sub Combo1_click()
'Label4.Caption = Combo1.Text
If Combo1.Text = "3(User Defined)" Then
Text2.Visible = True
Else
Text2.Visible = False
End If

'Dim a As String
'Dim b As Date
'b = DTPicker1
'
''a = day(DTPicker1)
''MsgBox a
'
'If Combo1.Text = 1 Then
'Text1.Text = DTPicker1 + 1
'DTPicker1 = Text1.Text
'a = Format$(DTPicker1, "dddd")
'If a = "Sunday" Then
'DTPicker1 = DTPicker1 + 1
'Text1.Text = DTPicker1
'Else
'If a = "Saturday" Then
'DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
'End If
'End If
'End If
'If Combo1.Text = 2 Then
'Text1.Text = DTPicker1 + 2
'DTPicker1 = Text1.Text
'a = Format$(DTPicker1, "dddd")
'If a = "Sunday" Then
'DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
'Else
'If a = "Saturday" Then
'DTPicker1 = DTPicker1 + 3
'Text1.Text = DTPicker1
'End If
''Text1.Text = DTPicker1 + Text2.Text
'End If
'End If
'If Combo1.Text = 3 Then
'For i = 1 To Text2.Text
'a = Format$(DTPicker1 + i, "dddd")
'If a = "Sunday" Then
'DTPicker1 = DTPicker1 + 1
'Text1.Text = DTPicker1
'Else
'If a = "Saturday" Then
'DTPicker1 = DTPicker1 + 2
'Text1.Text = DTPicker1
'End If
'End If
'
'Next i
'Text1.Text = DTPicker1 + Text2.Text
'End If
'
''DTPicker1 = Text1.Text
''a = Format$(DTPicker1, "dddd")
''If a = "Sunday" Then
''DTPicker1 = DTPicker1 + 1
''Text1.Text = DTPicker1
''Else
''If a = "Saturday" Then
''DTPicker1 = DTPicker1 + 2
''Text1.Text = DTPicker1
''End If
''End If
'
'
'DTPicker1 = b
End Sub

Private Sub Form_Load()
DTPicker1.Value = Now()
End Sub

AnswerRe: CONVERSION OF VB CODE TO JAVASCRIPT Pin
Christian Graus19-Feb-07 8:53
protectorChristian Graus19-Feb-07 8:53 
Questionadding new record and saving in VB.NET Pin
7prince19-Feb-07 6:15
7prince19-Feb-07 6:15 
AnswerRe: adding new record and saving in VB.NET Pin
Marcus J. Smith19-Feb-07 8:24
professionalMarcus J. Smith19-Feb-07 8:24 
GeneralRe: adding new record and saving in VB.NET Pin
7prince19-Feb-07 8:46
7prince19-Feb-07 8:46 
AnswerRe: adding new record and saving in VB.NET Pin
Christian Graus19-Feb-07 10:17
protectorChristian Graus19-Feb-07 10:17 
QuestionRetain values in drop down lists between redirects Pin
dasumohan19-Feb-07 5:20
dasumohan19-Feb-07 5:20 
AnswerRe: Retain values in drop down lists between redirects Pin
Marcus J. Smith19-Feb-07 6:55
professionalMarcus J. Smith19-Feb-07 6:55 
QuestionVb.net text box that accepts Caps A-Z Pin
kendo1719-Feb-07 5:09
kendo1719-Feb-07 5:09 
AnswerRe: Vb.net text box that accepts Caps A-Z Pin
Thomas Stockwell19-Feb-07 6:50
professionalThomas Stockwell19-Feb-07 6:50 
AnswerRe: Vb.net text box that accepts Caps A-Z Pin
Marcus J. Smith19-Feb-07 6:53
professionalMarcus J. Smith19-Feb-07 6:53 
AnswerRe: Vb.net text box that accepts Caps A-Z Pin
TwoFaced19-Feb-07 8:49
TwoFaced19-Feb-07 8:49 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
kendo1719-Feb-07 11:00
kendo1719-Feb-07 11:00 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
TwoFaced19-Feb-07 11:12
TwoFaced19-Feb-07 11:12 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
kendo1719-Feb-07 23:10
kendo1719-Feb-07 23:10 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
TwoFaced20-Feb-07 7:23
TwoFaced20-Feb-07 7:23 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
kendo1719-Feb-07 11:34
kendo1719-Feb-07 11:34 
GeneralRe: Vb.net text box that accepts Caps A-Z Pin
TwoFaced19-Feb-07 13:09
TwoFaced19-Feb-07 13:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.