Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ActiveControl method
Message
 
To
29/12/1998 17:14:22
Sammy Derban
Ghana Telecom
Accra, Ghana
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00171379
Message ID:
00171459
Views:
21
Hi
This is rather simple : some controls don't support the SelText property. So, if you want to copy from a listbox, for example, you can get the list.listitem(listindex) and paste it where you want. I suggest you to check, for each control, which property represent the select element, SelText for the TextBox, for example, and put a "great" if as following :
Function TextToCopy(Cont as Control)
 If TypeOf Cont Is TextBox 'Put after the "Is", the control class name
   TextToCopy$ = Cont.SelText
   Exit Function
 End If
 If TypeOf Cont Is ListBox
   TextToCopy$ = Cont.SelectedItem
   Exit Function
 End If
End Function
and so on, for each type of control onto your form.
Do you see ?
VB Developer
Servilog Concept
jmb@octalfrance.com
Previous
Reply
Map
View

Click here to load this message in the networking platform