Thread: User Forms
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Robin Hammond Robin Hammond is offline
external usenet poster
 
Posts: 79
Default User Forms

Nev,

Something like this. I haven't tested it live but it should give you the
idea.

Dim nCounter as integer

With MyForm
for nCounter = 65 to 90
vaData(1,nCounter-58) = .Controls("txt" & Chr(nCounter)).Text
next nCounter
End With

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Nev" wrote in message
...
I have a user form with a series of text boxes txtA txtB to txtZ
I have a series of routines to interchange data betwwen the text boxes
and an array,
e.g
vaData(1, 7) = txtA
vaData(1, 8) = txtB
vaData(1, 9) = txtC
vaData(1, 10) = txtD
vaData(1, 11) = txtE
vaData(1, 12) = txtF
vaData(1, 13) = txtG
how can I creat a loop to cycle through the text boxes?

nev



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/