View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
l1075[_3_] l1075[_3_] is offline
external usenet poster
 
Posts: 1
Default declaring varibles looping probelm

IM having trouble implementing the following code

Qty1 = txtQty1.Value
Qty2 = txtQty2.Value
....
....
Qty27 = txtQty27.Value
Qty28= txtQty28.Value

I have tried to use this code and it returns an error

For i = 1 To 28
Me.Controls("Qty" & i) = Me.Controls("txtQty" & i).Value
Next i

just wondering if there is a simplier way to do this

thank

--
Message posted from http://www.ExcelForum.com