Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Categories
Hello all:
I am making a userform with a text box and a RefEdit button. The user enters text in the textbox, and then selects a range with the RefeEdit. Now I need to apply the word from the text box in each cell from the range. However I need the current text in the range should stay, just the text from the text box should be "Added" before the original text. Please help me figure this out. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Categories
untested -- but might work
For Each c In 'the range you want to use c.Formula = textbox1.text & c.value End If Next "art" wrote: Hello all: I am making a userform with a text box and a RefEdit button. The user enters text in the textbox, and then selects a range with the RefeEdit. Now I need to apply the word from the text box in each cell from the range. However I need the current text in the range should stay, just the text from the text box should be "Added" before the original text. Please help me figure this out. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Categories
Something is wrong. First the error was end with out if. So I took it out.
The the error was on the first line: For Each c In Categories.RefEdit1.Value. Please help me finish this. Thanks for your help. "dmoney" wrote: untested -- but might work For Each c In 'the range you want to use c.Formula = textbox1.text & c.value End If Next "art" wrote: Hello all: I am making a userform with a text box and a RefEdit button. The user enters text in the textbox, and then selects a range with the RefeEdit. Now I need to apply the word from the text box in each cell from the range. However I need the current text in the range should stay, just the text from the text box should be "Added" before the original text. Please help me figure this out. Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Categories
I don't know what your Categories in Categories.RefEdit1.Value means. Is
that your object name of your Userform? Anyway, add the commandbutton in your userform and try the code below. first, input data in both textbox and refedit, then click the commandbutton. Private Sub CommandButton1_Click() Dim rng As Range For Each rng In Range(Me.RefEdit1.Value) rng.Value = Me.TextBox1.Value & rng.Value Next End Sub keiji art wrote: Something is wrong. First the error was end with out if. So I took it out. The the error was on the first line: For Each c In Categories.RefEdit1.Value. Please help me finish this. Thanks for your help. "dmoney" wrote: untested -- but might work For Each c In 'the range you want to use c.Formula = textbox1.text & c.value End If Next "art" wrote: Hello all: I am making a userform with a text box and a RefEdit button. The user enters text in the textbox, and then selects a range with the RefeEdit. Now I need to apply the word from the text box in each cell from the range. However I need the current text in the range should stay, just the text from the text box should be "Added" before the original text. Please help me figure this out. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting using 2 categories | Excel Discussion (Misc queries) | |||
Categories | Excel Programming | |||
Top Five in Categories | Excel Discussion (Misc queries) | |||
2 categories | Excel Discussion (Misc queries) | |||
sum over categories | Excel Discussion (Misc queries) |