Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clipboard use
Message
De
31/10/2001 04:27:27
 
 
À
30/10/2001 11:43:23
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00574779
Message ID:
00575504
Vues:
22
DOH!


I am using the UT virtual forum and I did not notice it was the VB form
sorry:)



>There is just one problem with this: this is the VB forum :)
>
>
>>There are quite a few ways to do this
>>
>>The crudest way could be
>>
>>lcTxt=strtran(_cliptext,chr(9),',') && covert the xl tab chars to commas
>>strtofile(lcTxt,'myfile.txt')
>>sele mytable
>>append from myfile.txt delim
>>
>>or
>>
>>to get more control you could use the ALINES function to pu all the lines into an array and then just parse the array a line at a time. Or even just use the MLINE() function and do it a line at a time.
>>
>>eg
>>
>>lcTxt=_cliptext
>>for li = 1 to memlines(lcTxt)
>> lcLine=mline(lcTxt,li)
>> repl myfield1 with subs(lcline,5,6),myfield1 with subs(lcline,5,6) etc
>>next
>>
>>I have not checked the above but it should give you some ideas
>>
>>good luck
>>
>>
>>
>>
>>
>>
>>
>>>I need to grab multi-line, multi-field text from the clipboard but don't know how to parse it with code.
>>>
>>>Basically, I'm thinking of having the user copy 2 columns of data from an Excel spreadsheet into clipboard and paste it into the database. I could use automation but the spreadsheet will have multiple worksheets so it makes things little more complicated.
>>>
>>>How can I paste what is in the clipboard in code? Something like:
>>>
>>>For Each "line" In "clipboardtext"
>>> Zipcode = Left(clipboardtext,5)
>>> Count = Val(Mid(clipboardtext,6))
>>>Next
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform