Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
Sheets("Team Data").Range("X2").Value & "4" = TextBox1.Value
I am trying to write a code(located above) that will insert TextBox1 value into a cell on Row4. The Column Letter will always be located in cell X2. For instance, if the value in cell X2 is "W", then I need the code to enter TextBox1.Value into cell W4. Here is the code I have so far. Right now the code is coming up color red and saying compile error: expected expression. I can not figure out what I'm doing wrong. Can anyone tell me what the correct code would be? Thank you Todd Huttenstine |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
One way:
With Sheets("Team Data") .Range(.Range("X2").Value & 4).Value = TextBox1.Value End With In article , "Todd Huttenstine" wrote: Sheets("Team Data").Range("X2").Value & "4" = TextBox1.Value I am trying to write a code(located above) that will insert TextBox1 value into a cell on Row4. The Column Letter will always be located in cell X2. For instance, if the value in cell X2 is "W", then I need the code to enter TextBox1.Value into cell W4. Here is the code I have so far. Right now the code is coming up color red and saying compile error: expected expression. I can not figure out what I'm doing wrong. Can anyone tell me what the correct code would be? Thank you Todd Huttenstine |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
Sheets("Team Data").Range(Range("X2").Value & "4") = TextBox1.Value
-- Vasant "Todd Huttenstine" wrote in message ... Sheets("Team Data").Range("X2").Value & "4" = TextBox1.Value I am trying to write a code(located above) that will insert TextBox1 value into a cell on Row4. The Column Letter will always be located in cell X2. For instance, if the value in cell X2 is "W", then I need the code to enter TextBox1.Value into cell W4. Here is the code I have so far. Right now the code is coming up color red and saying compile error: expected expression. I can not figure out what I'm doing wrong. Can anyone tell me what the correct code would be? Thank you Todd Huttenstine |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
Note that this will fail if Sheet Team Data is not the active sheet
since Range("X2") is not qualified In article , "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote: Sheets("Team Data").Range(Range("X2").Value & "4") = TextBox1.Value |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
Thanks, J.E.; good catch.
Regards, Vasant. "J.E. McGimpsey" wrote in message ... Note that this will fail if Sheet Team Data is not the active sheet since Range("X2") is not qualified In article , "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote: Sheets("Team Data").Range(Range("X2").Value & "4") = TextBox1.Value |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting TextBox1 Value into Conditional Column/Row4
Thanx to both.
"Todd Huttenstine" wrote in message ... Sheets("Team Data").Range("X2").Value & "4" = TextBox1.Value I am trying to write a code(located above) that will insert TextBox1 value into a cell on Row4. The Column Letter will always be located in cell X2. For instance, if the value in cell X2 is "W", then I need the code to enter TextBox1.Value into cell W4. Here is the code I have so far. Right now the code is coming up color red and saying compile error: expected expression. I can not figure out what I'm doing wrong. Can anyone tell me what the correct code would be? Thank you Todd Huttenstine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting text in column dependant on another column | Excel Worksheet Functions | |||
Inserting a new column affects conditional formatting | New Users to Excel | |||
TextBox1 to Label4 | Excel Discussion (Misc queries) | |||
Highlighting Textbox1 Value when form initializes. | Excel Programming | |||
UserForm1.Textbox1.SetFocus Question | Excel Programming |