Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I have two subs to put data from some TextBoxes (TB1 thru TB34) on a UserForm onto a row on a sheet. The first sub places the data in the first empty row - this one works. Here is the code: With Range("A65536").End(xlUp) For i = 1 To 34 .Offset(0, i).Value = _ Me.Controls("TB" & i).Value Next i End With The other sub is supposed to overwrite the row chosen from a ComboBox. These two subs are identical except for the choice of which row to put the data into. Here is the second sub: vRowToModify = CB1.ListIndex + 1 With Range("A" & vRowToModify) For i = 1 To 34 .Offset(0, i).Value = _ Me.Controls("TB" & i).Value Next i End With The variable vRowToModify does return the correct row number but I'm not sure how to use it. the Range statement is not right and that is messing up the sub Can someone help me with the syntax of this "With" statement? Nothing I have tried works. Any help is greatly appreciated, -Minitman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If syntax to test if command button exists | Excel Programming | |||
EXCEL command or syntax | Excel Programming | |||
Syntax for Excel variable using a SQL Select/From/Where Command... | Excel Programming | |||
Command text syntax and comma | Excel Programming | |||
Correct syntax for use Replace command via DDE? | Excel Programming |