Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Help with a User Form problem please

Hi,

I have a spreadsheet for which I have created two user forms. The
first user form is used for entering data and writing that data to the
next free row in my spreadsheet.

I want the second user form to select one of the rows that already
contains data (by using the unique identifier in column A) and writing
additional data to empty cells in that row.

I have loaded an example here

http://www.nidum.plus.com/Excelform2.html

Here for example, I would like the second user form to select the row
with the identifier AAA556 and add data to the cells Name 2, Data 3
and Data 4.

I have a combo box that shows the data in column A, but cannot work
out how to then select that row so the data may be written to the
required cells.

Can anyone please point me towards a solution?



--
Cheers

Peter

Remove the INVALID to reply
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with a User Form problem please

Peter,

The combobox value is obtained using

Combobox1.Value

You can use this value with a worksheet function to find the row

myRow = WorksheetFunction.Match(Combobox1.Value,
Activesheet.Range("A:A"),0)

and then directly load the cells

Activesheet.Cells(myRow,"E").Value = txtName2.Text

etc.

--

HTH

RP

"Peter" wrote in message
...
Hi,

I have a spreadsheet for which I have created two user forms. The
first user form is used for entering data and writing that data to the
next free row in my spreadsheet.

I want the second user form to select one of the rows that already
contains data (by using the unique identifier in column A) and writing
additional data to empty cells in that row.

I have loaded an example here

http://www.nidum.plus.com/Excelform2.html

Here for example, I would like the second user form to select the row
with the identifier AAA556 and add data to the cells Name 2, Data 3
and Data 4.

I have a combo box that shows the data in column A, but cannot work
out how to then select that row so the data may be written to the
required cells.

Can anyone please point me towards a solution?



--
Cheers

Peter

Remove the INVALID to reply



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Help with a User Form problem please

On Sat, 9 Oct 2004 11:38:02 +0100, "Bob Phillips"
wrote:

Peter,

The combobox value is obtained using

Combobox1.Value

You can use this value with a worksheet function to find the row

myRow = WorksheetFunction.Match(Combobox1.Value,
Activesheet.Range("A:A"),0)

and then directly load the cells

Activesheet.Cells(myRow,"E").Value = txtName2.Text

etc.


many thanks Bob,

It worked like a dream - exactly what I was after


--
Cheers

Peter

Remove the INVALID to reply
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with a User Form problem please

Good to hear that Peter, and thanks for letting us know.

Bob

"Peter" wrote in message
...
On Sat, 9 Oct 2004 11:38:02 +0100, "Bob Phillips"
wrote:

Peter,

The combobox value is obtained using

Combobox1.Value

You can use this value with a worksheet function to find the row

myRow = WorksheetFunction.Match(Combobox1.Value,
Activesheet.Range("A:A"),0)

and then directly load the cells

Activesheet.Cells(myRow,"E").Value = txtName2.Text

etc.


many thanks Bob,

It worked like a dream - exactly what I was after


--
Cheers

Peter

Remove the INVALID to reply



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
User Form Problem ??? mully New Users to Excel 5 July 2nd 08 11:53 AM
User form problem Freshman Excel Worksheet Functions 3 November 6th 06 05:54 PM
User Form Problem DCSwearingen Excel Discussion (Misc queries) 2 December 30th 05 03:42 PM
User Form Problem DCSwearingen Excel Discussion (Misc queries) 0 December 29th 05 11:04 PM
problem with user form chris[_3_] Excel Programming 1 July 15th 03 03:40 AM


All times are GMT +1. The time now is 10:54 AM.

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

About Us

"It's about Microsoft Excel"