![]() |
TextBox
Hi
I'm trying to loop through a series of "TextBox", where I take the content of the box if there is something there into another box on another sheet. Basicly this is what I'm trying to do: j = 1 For i = 1 To 5 If Sheet2.TextBox[i] = "Not Applicable" Else Sheet3.TextBox[j].Value = Sheet2.TextBox[i] End If Next i Can someone show me how I can do this with MS Excel VBA Many many THANKS ! ! ! Cheers René |
TextBox
Something like
Dim i As Long For i = 1 To ActiveSheet.OLEObjects.Count If TypeName(ActiveSheet.OLEObjects(i).Object) = "TextBox" Then If ActiveSheet.OLEObjects(i).Object.Value = "Not Applicable" Then ActiveSheet.OLEObjects(j).Value = ActiveSheet.OLEObjects(i).Value End If End If Next i -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "René Gagnon" wrote in message ... Hi I'm trying to loop through a series of "TextBox", where I take the content of the box if there is something there into another box on another sheet. Basicly this is what I'm trying to do: j = 1 For i = 1 To 5 If Sheet2.TextBox[i] = "Not Applicable" Else Sheet3.TextBox[j].Value = Sheet2.TextBox[i] End If Next i Can someone show me how I can do this with MS Excel VBA Many many THANKS ! ! ! Cheers René |
All times are GMT +1. The time now is 04:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com