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: 33
Default Userform Textboxes and Looping

Good evening,

I'm trying to move data from textboxes into Userform, but the following code
doesn't work (I've tried many variations to no avail). What am I doing wrong?

With Worksheets("Sheet1")
Range("A1").Select
If ActiveCell.Offset(1, 0) = "" Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.End(xlDown).Offset(1, 0).Select
End If
Set rng = ActiveCell
With rng
i = 1
For Each ctrl In Me.Controls
If TypeOf ctrl Is msForms.TextBox Then<----Runtime error 451
.Offset(0, i).Value = ctrl(i).Value
i = i + 1
End If
Next ctrl
End With
End With
 
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
Looping through textboxes CLamar Excel Discussion (Misc queries) 1 July 12th 06 04:33 PM
UserForm TextBoxes Rob Excel Discussion (Misc queries) 2 August 6th 05 03:07 AM
userform & textboxes beginner Excel Programming 3 July 27th 04 10:56 AM
userform textboxes again Jo[_6_] Excel Programming 4 October 21st 03 07:25 PM
userform textboxes Jo[_6_] Excel Programming 4 October 21st 03 07:15 PM


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

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"