is there any option like datachanged or Change for ListView
I need make command when listview change items
Note : listview invisible so it`s can`t change manual items or click on it
thankx
Printable View
is there any option like datachanged or Change for ListView
I need make command when listview change items
Note : listview invisible so it`s can`t change manual items or click on it
thankx
If there can not be changes by the user,
then you'll be doing all the changes in you code,
so you must know when a change has happened.
To put all changes in one place do like this
I have dun this to a text box b4Code:Public Sub AddTolistview(Info1, Info2)
make_command
listview1 ............
End Sub
Public Sub DeleteFromlistview(Info1, Info2)
make_command
listview1................
End Sub
Code:Public Sub AddText(TheText As String)
Text1 = Text1 & TheText & vbNewLine
Command3.Enabled = False
Command5.Enabled = True
playsound (thisSoundFile)
End Sub
I`m beginner
can you make Code Example
when listview additems Command1_Click
Thank you very Much
Code:Private Sub Command3_Click()
' Add names to column 1.
AddNameTo ListView1, 1, "Mary"
'this is the same as [Set itmX= ListView1.ListItems.Add(1, "Mary", "Mary")]
End Sub
Public Sub AddNameTo(ThisListView As ListView, TheColumn As Long, Name As String)
makeYour_command
Dim itmX As ListItem
Set itmX = ThisListView.ListItems.Add(TheColumn, Name, Name)
End Sub
Great thank you so Much
I have Different Question:
is there and Simple Easy Code for split Word
ML&R
its ok I search and found it here :)
Best Forums <3vb Code:
Private Sub Command1_Click() mystr = "vbforums.com/newthread.php?do=newthread&f=12345" MsgBox Mid$(mystr, InStr(1, mystr, "/", vbTextCompare), Len(mystr)) End Sub
Here is some info on 'Split', 'Left' and 'Right'
Or, if you likeCode:Dim AnyString As String, MyStr As String
AnyString = "Hello World" ' Define string.
MyStr = Left(AnyString, 1) ' Returns "H".
MyStr = Left(AnyString, 7) ' Returns "Hello W".
MyStr = Left(AnyString, 20) ' Returns "Hello World".
MyStr = Right(AnyString, 1) ' Returns "d".
MyStr = Right(AnyString, 6) ' Returns " World".
MyStr = Right(AnyString, 20) ' Returns "Hello World".
MyStr = Split(AnyString, " ")(0) ' Returns "Hello".
MyStr = Split(AnyString, " ")(1) ' Returns "World"
Dim AnyString As String, MyStr As String
Dim MyStrArray() As String
MyStrArray = Split(AnyString, " ") ' Returns MyStrArray(0) = "Hello",MyStrArray(0) = "World"
Code:Dim MyStrArray() As String
AnyString = "Hello/World" ' Define string.
MyStr = Split(AnyString, "/")(0) ' Returns "Hello".
MyStr = Split(AnyString, "/")(1) ' Returns "World"
MyStrArray = Split(AnyString, "/") ' Returns MyStrArray(0) = "Hello"
' MyStrArray(1) = "World"
Cool Thank you