15,897,518 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Bhavesh Vankar (Top 23 by date)
Bhavesh Vankar
9-Dec-21 6:01am
View
right sir but in my side when i select checkbox i got the comma backside. and vb6.0 is too old but our project is build in vb6.0 and this is small update in this project so that why i have to solve this.
Bhavesh Vankar
27-Sep-21 3:05am
View
but i have tried all the things from google and other platforms but still not resolved both queries...
Bhavesh Vankar
12-Apr-21 5:55am
View
sir can you explain me with example i am new and having no much idea about vb6.0 how to use CStr(). and how to program it to display age...
Bhavesh Vankar
12-Apr-21 5:28am
View
this is solved but still pending how to display age in textbox by sql query which is computed. means i have used this code
If rs.state = adStateOpen Then rs.Close
rs.Open "Select DATEDIFF(YEAR,CONVERT(datetime,'" & txtBirthdate.Text & "',103),CONVERT(datetime,V_ISSUEDATE,103)) from VISITOR_MASTER_NEW", cn.Conn, adOpenDynamic, adLockOptimistic
in this below line i want to display my computed age how to do this.
txtAge.Text = rs("V_AGE") & ""
Bhavesh Vankar
12-Apr-21 5:10am
View
in V_ISSUEDATE column stored only date. but main question is using above query i find age successfully but how to display that output age in textbox like txtage.text see my above code after query i have used this line to display age in textbox txtAge.Text = rs("V_AGE") & "" is this right....it generate error "method 'Item' of object 'Fields' failed" and i have replaced datetime instead of varchar in sql query..
Bhavesh Vankar
12-Apr-21 5:00am
View
but it still not resolved and in this question different query i am not understanding what to do if calculated age display in age textbox...?
Bhavesh Vankar
7-Apr-21 4:56am
View
ok thanks....
Bhavesh Vankar
7-Apr-21 2:25am
View
i have used vb6.0..not vb.net...
Bhavesh Vankar
5-Apr-21 9:18am
View
i have used above code to calculate age of person. but its getting me error. Type mismatched when i enter any value in textbox i have wrote this code like as below...
i want to display age in textbox when user enter date of birth in textbox like 01/02/1985. age should be display in textbox. how to do this. ?
Private Sub txtdateofBirth_Change()
If txtcurrentDate.Text Is Date Then
txtdateofBirth.Text = DateDiff(DateInterval.Year, Now, CDate(txtcurrentDate.Text)).ToString
End If
End Sub
Bhavesh Vankar
3-Apr-21 8:10am
View
this is my question i have no idea how to do it sir...i little try by google but confused how to do it...
Bhavesh Vankar
3-Apr-21 8:02am
View
this is my question sir..also query...
Bhavesh Vankar
3-Apr-21 5:10am
View
record not being save....its store text "OTHER DEPARTMENT" in table column i want to store Textbox value in table column instead of combobox.
Bhavesh Vankar
31-Mar-21 7:38am
View
this problem is occur the number is sorting in disorder how to convert it in integer...to sort in ascending my checkbox is 14+
Bhavesh Vankar
31-Mar-21 7:05am
View
thank you sir now its working properly in my project...
Bhavesh Vankar
31-Mar-21 6:12am
View
Deleted
this line "ReDim Preserve TheArray(index - 1)" 'Get rid of the empty spaces showing me error "subscript out of rang"
Bhavesh Vankar
31-Mar-21 5:56am
View
ohhh....ya... its true sir.. i have search on many site but still not getting any answer...
really you are VB6 GURU....and thanks for your support....
Bhavesh Vankar
31-Mar-21 5:54am
View
this is working but still one issue it showing me output like this 2,1,, after no showing two separator..
Bhavesh Vankar
31-Mar-21 5:49am
View
reason for this "Caroline, i've got new nickname for you: VB6 Guru! ;)"
Bhavesh Vankar
31-Mar-21 5:36am
View
reason ?
Bhavesh Vankar
31-Mar-21 5:31am
View
when i enable SortArray TheArray this line it generate error sub or function not defined.. i have write it as below
Sub chkcheck()
Dim m As Integer
m = Me.Controls.Count
ReDim TheArray(m) As String
Dim cBox As Object, index As Integer
index = 0
For Each cBox In Me.Controls
'Debug.Print TypeName(cBox), cBox.Caption
If TypeName(cBox) = "CheckBox" Then
If cBox.Value = 1 Then
TheArray(index) = cBox.Caption
index = index + 1
End If
End If
Next
ReDim Preserve TheArray(index + 1) 'Get rid of the empty spaces
'Sort the array alphabetically
SortArray TheArray
Dim s As String
s = Join(TheArray, vbCrLf)
Me.txtBlockNo.Text = s
End Sub
in short when i select one or multiple checkbox it should be display in textbox like 1,2,3,4
Bhavesh Vankar
31-Mar-21 5:18am
View
i have modified your code according to my project requirement. but their is only one issue. kindly help..
i want to display selected checkbox value like 1,2,3,4.....13,14 when i select checkbox it display like 123
Sub chkcheck()
Dim m As Integer
m = Me.Controls.Count
ReDim TheArray(m) As String
Dim cBox As Object, index As Integer
index = 0
For Each cBox In Me.Controls
'Debug.Print TypeName(cBox), cBox.Caption
If TypeName(cBox) = "CheckBox" Then
If cBox.Value = 1 Then
TheArray(index) = cBox.Caption
index = index + cBox
End If
End If
Next
ReDim Preserve TheArray(index + 1) 'Get rid of the empty spaces
'Sort the array alphabetically
'SortArray TheArray
Dim s As String
s = Join(TheArray, vbCrLf)
Me.txtBlockNo.Text = s
End Sub
Bhavesh Vankar
31-Mar-21 5:09am
View
Deleted
Dear sir,
Actually in my old project used vb6.0. and currently having some update like their is 14th checkboxes when user select any checkbox like check1, check2, check3 then the its value should be display in textbox like 1,2,3. checkbox showing block no.
its working but occur error "subscript out of rang"
Bhavesh Vankar
31-Mar-21 4:40am
View
but my project is in vb6.0 and its currently online at client side. can you help with code example i am new in vb6.0.
Show More