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

As far as I could tell from your email this is what you
were wanting. There was some guessing so it might be wrong.

Instead of having the information separated amongst the
different textboxes you might be better off just using one
large textbox and constructing a complex string (using
vbLf to create line change). You would thus read the info
like a report in this large textbox. Alternatively, use
labels perhaps. Just throwing out some ideas.

Note that, for my tests, I added more textboxes to the UF
so that there was a total of 18 "txtdes" type
(i.e. "txtdes1" to "txtdex18") corresponding with the 18
Attribute cells. You should do this to test the code. Hope
my interpretation was correct.

Private Sub CommandButton1_Click()
Dim WS As Worksheet
Dim C As Range, CC As Range
Dim i As Integer, ii As Integer
Dim x As Integer

On Error Resume Next
Set WS = Sheets("Blad1")
Set C = WS.Range("A:A").Find(txtcode.Value)
i = 0: ii = 0: x = 0
For i = 2 To 18 Step 8
For ii = 1 To 2
Set CC = WS.Cells(C.Row, i + ii)
Controls("TextBox" & x * 2 + ii) = CC
Next ii
For ii = 3 To 8
Set CC = WS.Cells(C.Row, i + ii)
If Trim(CC) < "" Then
x = x + 1
Controls("txtdes" & x) = CC
End If
Next ii
Next i
On Error GoTo 0
End Sub

Regards,
Greg


-----Original Message-----
Hello Greg,

That would be very helpful,

Where can I find your e-mail address?

Thanks and best regards,

gki


---
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 02:08 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"