Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Combobox - to specific row?

Hello,

I have a userform with a combobox and some textboxes.
The combobox gets its list from a range of rows in one of the sheets.

The user selects a value in the combobox, and can fill the other
textfields. When the user presses the OK button in the form, I want
the values of the textboxes to be put to specific columns on the row
corresponding to the row that is selected in the combobox.

Please help me how to solve this!

I should also mention that the range is dynamic, so it its resized
with another row (eg from A1:A50 to A1:A51). The problem is to have
values placed in eg B15 and C15 if the user selects the value from
A15 in the combobox.


Hope for help :-)
NorTor

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox - to specific row?

Try something like this:

Code
-------------------
Sub CommandButton_Click()

dim r as Range

For Each r in Range("A1:A" & Range("A65536").End(xlUp).Row
If r.Value = Combo1.Text Then
Range("B" & r.Row).Value = Text1.Text
Range("C" & r.Row).Value = Text2.Text
Exit For
End If

Next

End Su
-------------------

It basically searches the A column until it finds the same thin
selected in the combobox, then puts the text box values into columns
and C of the same row.



--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Combobox - to specific row?

Thank you so much for you reply, I will try it right away :)


Regards
NorTor



On Thu, 1 Jul 2004 12:26:44 -0500, kkknie
wrote:

Try something like this:

Code:
--------------------
Sub CommandButton_Click()

dim r as Range

For Each r in Range("A1:A" & Range("A65536").End(xlUp).Row
If r.Value = Combo1.Text Then
Range("B" & r.Row).Value = Text1.Text
Range("C" & r.Row).Value = Text2.Text
Exit For
End If

Next

End Sub
--------------------

It basically searches the A column until it finds the same thing
selected in the combobox, then puts the text box values into columns B
and C of the same row.

K


---
Message posted from http://www.ExcelForum.com/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Not allowing to continu unless a specific cell has specific answer madubois9 Excel Discussion (Misc queries) 3 October 25th 07 12:45 AM
Link to specific cell in specific Excel file JeroenM Excel Discussion (Misc queries) 3 July 6th 07 10:08 AM
Link from a specific Cell in Excel to a specific para. in Word CathyK Excel Worksheet Functions 0 August 10th 06 04:40 PM
Highlight a row if a specific cell is specific numbers/words sea0221 Excel Worksheet Functions 2 March 9th 05 12:06 AM


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"