ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   loop in a textbox (https://www.excelbanter.com/excel-programming/305887-loop-textbox.html)

libby

loop in a textbox
 
Hi

Is there any way of looping through each character in a
text box?

I've got as far as

Dim i as integer

For i = 0 to Textbox1.textlength


next

but I'm not sure how to reference a character in the
textbox.

Thanks

Bob Phillips[_6_]

loop in a textbox
 

For i = 1 To Len(Textbox1.Text)
thisChar = Mid(TextBox1.Text,i,1)
... now you can process thisChar
Next i

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"libby" wrote in message
...
Hi

Is there any way of looping through each character in a
text box?

I've got as far as

Dim i as integer

For i = 0 to Textbox1.textlength


next

but I'm not sure how to reference a character in the
textbox.

Thanks





All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com