Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Two things:
First you have to declare the RngArr() variable as public as below (outside the module), and remove the related Dim statement: Public rngArr() As Range Second you have a syntax error in your macro, if values is to be written back to column 7, then use this: Private Sub CommandButton1_Click() Cells(rngArr(0).Row, 7).Value = Me.TextBox1.Value Cells(rngArr(1).Row, 7).Value = Me.TextBox2.Value Cells(rngArr(2).Row, 7).Value = Me.TextBox3.Value End Sub Regards, Per On 25 Sep., 20:39, "Patrick C. Simonds" wrote: I seem to be at a lose to be able to get this to write data back to the worksheet after the the TextBoxes have been edited. Private Sub CommandButton1_Click() * *Cells(rngArr(0).Row,(1, 7).Value = TextBox1.Value * *Cells(rngArr(1).Row,(1, 7).Value = TextBox2.Value * *Cells(rngArr(2).Row,(1, 7).Value = TextBox3.Value End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statement propblem | Excel Discussion (Misc queries) | |||
Propblem setting OnAction property at runtime | Excel Programming |