Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Userform text & combobox population help required please

Help Im stuck again!!!

I am using a userform to enter details into cells to create an Excel
database.
Clicking a commandbutton enters the details from the boxes into the next
available row of the database. During this process column A of the row is
given a number.

I would like to be able to "re-use" the userform to recall any individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of the
userform are re-populated with the other details from the row ---If that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform text & combobox population help required please

instead of

Cells(i,3).Value = Textbox3.text

do

Textbox3.Text = cells(clng(Textbox1.Text),3)

I assume you would have a separate button on the userform to retrieve data.

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Help Im stuck again!!!

I am using a userform to enter details into cells to create an Excel
database.
Clicking a commandbutton enters the details from the boxes into the next
available row of the database. During this process column A of the row is
given a number.

I would like to be able to "re-use" the userform to recall any individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of the
userform are re-populated with the other details from the row ---If

that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Userform text & combobox population help required please

Hello Tom

You are way above me!
I am not sure of what I am doing here.
I ran the code -

Sub IdentRetrieve()
TextBox2.Text = Cells(CLng(TextBox1.Text),2)
End Sub

- from a button on the userform however I got Runtime Error '424' Object
Required

What is wrong?
The userform is still displayed on the screen but has not been updated

Am I correct is presuming the line of code means (in laymens terms)
Use the text in TextBox2 {24}
Find the cell containing this value {column A Row 25}
Get the value of the cell in column B - same row {because of the ,2}
Put this value into TextBox1

I am using Win Me and Office 2000

Kenny


"Tom Ogilvy" wrote in message
...
instead of

Cells(i,3).Value = Textbox3.text

do

Textbox3.Text = cells(clng(Textbox1.Text),3)

I assume you would have a separate button on the userform to retrieve

data.

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Help Im stuck again!!!

I am using a userform to enter details into cells to create an Excel
database.
Clicking a commandbutton enters the details from the boxes into the next
available row of the database. During this process column A of the row

is
given a number.

I would like to be able to "re-use" the userform to recall any

individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of the
userform are re-populated with the other details from the row ---If

that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform text & combobox population help required please

assume Textbox1.Text holds the row number you are working in {25}

Textbox2.Text = Cells(25,2).Value

so you basically describe it correctly except the value in B25 is placed in
Textbox2.

--
Regards,
Tom Ogilvy


"Kennyatwork" wrote in message
...
Hello Tom

You are way above me!
I am not sure of what I am doing here.
I ran the code -

Sub IdentRetrieve()
TextBox2.Text = Cells(CLng(TextBox1.Text),2)
End Sub

- from a button on the userform however I got Runtime Error '424' Object
Required

What is wrong?
The userform is still displayed on the screen but has not been updated

Am I correct is presuming the line of code means (in laymens terms)
Use the text in TextBox2 {24}
Find the cell containing this value {column A Row 25}
Get the value of the cell in column B - same row {because of the ,2}
Put this value into TextBox1

I am using Win Me and Office 2000

Kenny


"Tom Ogilvy" wrote in message
...
instead of

Cells(i,3).Value = Textbox3.text

do

Textbox3.Text = cells(clng(Textbox1.Text),3)

I assume you would have a separate button on the userform to retrieve

data.

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Help Im stuck again!!!

I am using a userform to enter details into cells to create an Excel
database.
Clicking a commandbutton enters the details from the boxes into the

next
available row of the database. During this process column A of the

row
is
given a number.

I would like to be able to "re-use" the userform to recall any

individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of the
userform are re-populated with the other details from the row ---If

that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Userform text & combobox population help required please

Sorry to trouble you again Tom but this code does not work

I am still getting runtime error '424' Object required

As I may have been mixed up with my TextBoxes I swapped them about but still
keep getting the error.

Also I think I am confusing the issue with Row numbers and numbers in column
A Would this cause the problem.?

A brief run through again -

Userform1contains several text boxes and is used to enter details into the
Excel database.

Textbox 1 enters details into column B of the next available row
Textbox 3 enters details into column C of the same row
Textbox 6 enters details into column D of the same row

Column A of this row is automatically given a number (call it an ID number)
this does not match the row number.

several entries later....

I call userform1 and enter one of the ID numbers into textbox 2

On clicking a button to run the code I require. The other textboxes are to
be populated with the info as entered earlier.

I know it is basically a lookup but I am really stuck

Could you help further

Kenny










"Tom Ogilvy" wrote in message
...
assume Textbox1.Text holds the row number you are working in {25}

Textbox2.Text = Cells(25,2).Value

so you basically describe it correctly except the value in B25 is placed

in
Textbox2.

--
Regards,
Tom Ogilvy


"Kennyatwork" wrote in message
...
Hello Tom

You are way above me!
I am not sure of what I am doing here.
I ran the code -

Sub IdentRetrieve()
TextBox2.Text = Cells(CLng(TextBox1.Text),2)
End Sub

- from a button on the userform however I got Runtime Error '424' Object
Required

What is wrong?
The userform is still displayed on the screen but has not been updated

Am I correct is presuming the line of code means (in laymens terms)
Use the text in TextBox2 {24}
Find the cell containing this value {column A Row 25}
Get the value of the cell in column B - same row {because of the ,2}
Put this value into TextBox1

I am using Win Me and Office 2000

Kenny


"Tom Ogilvy" wrote in message
...
instead of

Cells(i,3).Value = Textbox3.text

do

Textbox3.Text = cells(clng(Textbox1.Text),3)

I assume you would have a separate button on the userform to retrieve

data.

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Help Im stuck again!!!

I am using a userform to enter details into cells to create an Excel
database.
Clicking a commandbutton enters the details from the boxes into the

next
available row of the database. During this process column A of the

row
is
given a number.

I would like to be able to "re-use" the userform to recall any

individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of the
userform are re-populated with the other details from the

---If
that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Userform text & combobox population help required please

Hello

It looks as though my thread is dead!
If anyone picks it up at a later date I eventually got toms code to work -
Only by specifying the userform
i.e. Userform1.TextBox1
However his code still looked at row numbers not the numbers in column A
I used;-

ans = UserForm1.TextBox2.Value
res = Application.Match(CLng(ans), Range("A2:A3000"), 0)
Range("A2:A3000")(res).Activate

to locate the correct row then used

UserForm1.TextBox1.Text = ActiveCell.Offset(0, 1).Value
UserForm1.ComboBox1.Value = ActiveCell.Offset(0, 2).Value
UserForm1.ComboBox2.Value = ActiveCell.Offset(0, 3).Value

to populate the textboxes

Hope that is useful to other readers

Kenny

"Kennyatwork" wrote in message
...
Sorry to trouble you again Tom but this code does not work

I am still getting runtime error '424' Object required

As I may have been mixed up with my TextBoxes I swapped them about but

still
keep getting the error.

Also I think I am confusing the issue with Row numbers and numbers in

column
A Would this cause the problem.?

A brief run through again -

Userform1contains several text boxes and is used to enter details into the
Excel database.

Textbox 1 enters details into column B of the next available row
Textbox 3 enters details into column C of the same row
Textbox 6 enters details into column D of the same row

Column A of this row is automatically given a number (call it an ID

number)
this does not match the row number.

several entries later....

I call userform1 and enter one of the ID numbers into textbox 2

On clicking a button to run the code I require. The other textboxes are

to
be populated with the info as entered earlier.

I know it is basically a lookup but I am really stuck

Could you help further

Kenny










"Tom Ogilvy" wrote in message
...
assume Textbox1.Text holds the row number you are working in {25}

Textbox2.Text = Cells(25,2).Value

so you basically describe it correctly except the value in B25 is

placed
in
Textbox2.

--
Regards,
Tom Ogilvy


"Kennyatwork" wrote in message
...
Hello Tom

You are way above me!
I am not sure of what I am doing here.
I ran the code -

Sub IdentRetrieve()
TextBox2.Text = Cells(CLng(TextBox1.Text),2)
End Sub

- from a button on the userform however I got Runtime Error '424'

Object
Required

What is wrong?
The userform is still displayed on the screen but has not been updated

Am I correct is presuming the line of code means (in laymens terms)
Use the text in TextBox2 {24}
Find the cell containing this value {column A Row 25}
Get the value of the cell in column B - same row {because of the ,2}
Put this value into TextBox1

I am using Win Me and Office 2000

Kenny


"Tom Ogilvy" wrote in message
...
instead of

Cells(i,3).Value = Textbox3.text

do

Textbox3.Text = cells(clng(Textbox1.Text),3)

I assume you would have a separate button on the userform to

retrieve
data.

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Help Im stuck again!!!

I am using a userform to enter details into cells to create an

Excel
database.
Clicking a commandbutton enters the details from the boxes into

the
next
available row of the database. During this process column A of

the
row
is
given a number.

I would like to be able to "re-use" the userform to recall any
individual
row by the given number.
E.G. Enter the number into a textbox and the other text boxes of

the
userform are re-populated with the other details from the

---If
that
makes sense!

I hope somebody can understand and offer some help

Thanks

Kenny












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
Userform list box population Alberto Ast[_2_] Excel Discussion (Misc queries) 3 November 21st 09 01:14 AM
Value From ComboBox On UserForm jlclyde Excel Discussion (Misc queries) 3 October 16th 09 01:43 PM
Trouble with a ComboBox on a UserForm ryguy7272 Excel Discussion (Misc queries) 1 February 20th 08 09:02 PM
ComboBox on a UserForm LLoyd Excel Worksheet Functions 2 February 20th 08 09:01 PM
Userform w/ComboBox D.Parker Excel Discussion (Misc queries) 2 May 6th 05 04:28 PM


All times are GMT +1. The time now is 12:41 PM.

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"