Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
can't transfer to worksheet
I have the following code that inputs a specified number of textboxes
based on the users input in another textbox. I am having trouble passing info from the created textboxes to a worksheet. When I try to run the code it comes up with object required. I tried the code with a textbox that is put there at design time and it works fine. Please help me. 'code to create boxes sub For i = 1 To txtQty.Value Step 1 With Me.Controls.Add("Forms.textbox.1") .Top = 115 + (17 * i) .Left = 20 .Height = 17 .Width = 50 .Name = "txtNum" & i End With Next i end sub 'code to transfer data Private Sub CommandButton1_Click() ActiveSheet.Range("a1") = txtNum1.Value End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
can't transfer to worksheet
ActiveSheet.Range("a1") = Me.Controls("txtNum1").Value
stewart wrote: I have the following code that inputs a specified number of textboxes based on the users input in another textbox. I am having trouble passing info from the created textboxes to a worksheet. When I try to run the code it comes up with object required. I tried the code with a textbox that is put there at design time and it works fine. Please help me. 'code to create boxes sub For i = 1 To txtQty.Value Step 1 With Me.Controls.Add("Forms.textbox.1") .Top = 115 + (17 * i) .Left = 20 .Height = 17 .Width = 50 .Name = "txtNum" & i End With Next i end sub 'code to transfer data Private Sub CommandButton1_Click() ActiveSheet.Range("a1") = txtNum1.Value End Sub -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
can't transfer to worksheet
On Sep 12, 9:33 pm, Dave Peterson wrote:
ActiveSheet.Range("a1") = Me.Controls("txtNum1").Value stewart wrote: I have the following code that inputs a specified number of textboxes based on the users input in another textbox. I am having trouble passing info from the created textboxes to a worksheet. When I try to run the code it comes up with object required. I tried the code with a textbox that is put there at design time and it works fine. Please help me. 'code to create boxes sub For i = 1 To txtQty.Value Step 1 With Me.Controls.Add("Forms.textbox.1") .Top = 115 + (17 * i) .Left = 20 .Height = 17 .Width = 50 .Name = "txtNum" & i End With Next i end sub 'code to transfer data Private Sub CommandButton1_Click() ActiveSheet.Range("a1") = txtNum1.Value End Sub -- Dave Peterson Bingo...Thanks again |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and TRansfer from another Tab in same Worksheet | Excel Discussion (Misc queries) | |||
Transfer entities from rows/column of one worksheet to another worksheet | Excel Programming | |||
Transfer data from one worksheet to another | Excel Programming | |||
Transfer "Tabs name" to a worksheet | Excel Discussion (Misc queries) | |||
transfer one worksheet to another worksheet without losing format. | Excel Worksheet Functions |