LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Collecting textbox input within a for loop

I am attempting to collect textbox input within a for loop in Sheet1.
It does not stop on the activate and just zooms through the for loop
without prompting for the field. Then it should transfer the data which
was input to a range in Sheet2. Anyone who can tell me what is wrong?

Thanks so much.
-Michael

------------------------------------------------------------------------------------------------------------------------------------

Private Sub Workbook_Open()

Dim OLEObj As OLEObject
Dim iCtr As Long
Dim CellToCheck, Cell2ToCheck, CellToGet, Cell2ToGet As Range


Set CellToGet = Sheet2.Range("d1")


' gather initial 4 textboxes

For iCtr = 1 To 4
Set OLEObj = Sheet1.OLEObjects("TextBox" & iCtr)
OLEObj.Activate
With OLEObj.Object
CellToGet.Value = .Value
End With
'dropdown one row for the next text box
Set CellToGet = CellToGet.Offset(1, 0)

Next iCtr

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop Through textbox in Excel sweet Excel Programming 1 January 24th 06 04:04 PM
loop through textbox in Excel [email protected] Excel Programming 2 January 24th 06 04:01 PM
Using a DO loop to add values into a textbox Ian B Excel Programming 2 September 12th 05 07:07 PM
loop in a textbox libby Excel Programming 1 August 3rd 04 11:30 PM
validation of input in textbox Peer Excel Programming 3 July 23rd 04 03:06 PM


All times are GMT +1. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"