Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Response to Userform Problems?

Hi Sue

The code below will take the value of each of the 24 textboxes and
pass it to the next empty row on the sheet 8 controls at a time. I
hope this is of some help to you

Option Explicit
Dim Ctrl As Control
Dim i As Integer
Dim NewRec As Range
Private Sub CommandButton1_Click()

Set NewRec = [D65535].End(xlUp).Offset(1, 0)

For i = 1 To 24

Set Ctrl = UserForm1.Controls("TextBox" & i)

If i = 9 Or i = 17 Then

Set NewRec = NewRec.Offset(1, -8)

End If

NewRec.Value = Ctrl.Value

Set NewRec = NewRec.Offset(0, 1)

Next i

End Sub

Steve

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Response to Userform Problems?

Could you keep your responses in the same thread as the question? Separate
responses do not benefit anyone who has read the initial thread.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Incidental" wrote in message
oups.com...
Hi Sue

The code below will take the value of each of the 24 textboxes and
pass it to the next empty row on the sheet 8 controls at a time. I
hope this is of some help to you

Option Explicit
Dim Ctrl As Control
Dim i As Integer
Dim NewRec As Range
Private Sub CommandButton1_Click()

Set NewRec = [D65535].End(xlUp).Offset(1, 0)

For i = 1 To 24

Set Ctrl = UserForm1.Controls("TextBox" & i)

If i = 9 Or i = 17 Then

Set NewRec = NewRec.Offset(1, -8)

End If

NewRec.Value = Ctrl.Value

Set NewRec = NewRec.Offset(0, 1)

Next i

End Sub

Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Response to Userform Problems?

Hi Jon

i agree fully the only reason i posted a new reply is because the
original post was giving me an error when i tried to access it. i
prob should have noted that in my post to prevent confusion...

Steve




Reply
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
How do I transform a word response to a numeric response? kanegaro Excel Discussion (Misc queries) 0 January 11th 08 05:08 PM
How do I set up a daily call out response response register? Pule Excel Worksheet Functions 1 October 7th 07 01:34 PM
show userform when response = yes musa.biralo Excel Programming 2 September 17th 06 07:31 PM
show userform when response = yes musa.biralo Excel Programming 0 September 17th 06 06:44 PM
userform problems [email protected] Excel Programming 0 February 13th 05 01:27 PM


All times are GMT +1. The time now is 04:13 AM.

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

About Us

"It's about Microsoft Excel"