LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Populating data on userform

Hello All,

I am sure that you, guys, would know the answer to my question.

As I attached a sample of my database underneath, I would like t
populate the information belonging to each product ID when I click o
commandbutton on the userform.

So far I tried to run several programme codes with searching function
but I cannot make it correct....

The programme should look like as below
Dim a(20) As Variant b(20) Variant
Dim x As Integer, Column As Integer
x=1: column=74

Do Until IsEmpty(Sheets("Sheet1").Cells(2,Column))
If Sheets("Sheet1").Cells(1, Column).Value=txtcode.value Then
a(x)=Sheets("Sheet1").Cells(3, Column)
b(x)=Sheets("Sheet1").Cells(4, Column)
.....
x=x+1
End If

column=column+1

Loop

Dim c As Object, d As Object
For x=1 To 20
Set c=Userform1.Controls("txtco0" & x)
Set d = Userform1.Controls("txtdefinition0" & x)
c.Value=a(x)
d.Value=b(x)
Next x

Once it reach the empty cell, it should look for the next component.

I am sure that I am very close to the solution, but I am already blin
and tired....

I need to breathe. Please HELP!!!

:(

Thanks for your time,

Looking forward to hear you soon,

Gk

Attachment filename: question.gif
Download attachment: http://www.excelforum.com/attachment.php?postid=62769
--
Message posted from http://www.ExcelForum.com

 
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
Populating a userform 3 col listbox Martin[_13_] Excel Programming 0 April 19th 04 09:49 PM
Populating word document from userform inputs. David Goodall Excel Programming 1 December 29th 03 11:25 PM
Populating Sheet Data From A UserForm Combo Box Enabled For Multi-Choices R3df1sh[_3_] Excel Programming 1 December 4th 03 08:58 PM
Populating a VBA UserForm Danny Sowden Excel Programming 0 August 19th 03 03:11 PM
Populating Textbox in UserForm Derek[_2_] Excel Programming 3 July 10th 03 10:41 PM


All times are GMT +1. The time now is 05:29 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"