PDA

View Full Version : How to show Detail Box



MrYemin09
11-21-2009, 03:17 PM
Hi,
Please teache me how to write VBA code for Detail Box in Excel .I try write code ,but i recevided Name . I will show Detail Box as at the Example.
Please Help me! :(

Example......http://www.sendspace.com/file/h7pjv8 (http://www.sendspace.com/file/h7pjv8)

Sub Detail()
Dim cel As Range
Dim txt As String
For Each cel In Cells(ActiveCell.Row, 1).Resize(, 15)
If cel = ActiveCell.Value Then
txt = txt & cel & vbCr
End If
Next
MsgBox txt

End Sub




Thanks for Help me!:hi:

mdmackillop
11-21-2009, 03:36 PM
You can attach an excel file using Manage Attachments in the Go Advanced reply section.

lucas
11-21-2009, 03:37 PM
I don't have winrar anymore.

Why can't you just attach it to your post?

select "post reply" at the lower left of the last post, then scroll down and look for a button that says "manage attachments"

MrYemin09
11-22-2009, 08:12 AM
Hi,
Please Help me !
How to show Details Box ?
I attached Example. :(
I wait for this Answer!

Very Thanks!

mdmackillop
11-22-2009, 10:55 AM
Try this

MrYemin09
11-22-2009, 02:53 PM
Very Thanks! mdmackillop
I will try test!

MrYemin09
11-22-2009, 04:54 PM
Hi mdmackillop
I try add (iamge1.Picture) code in listbox1 ,but when run code unknown "Name" ,please explain me how can show image for select Name.

mdmackillop
11-22-2009, 07:34 PM
Select Case Cells(Rw, 2)
Case "Jon"
Image1.Picture = LoadPicture("C:\Test\Jon.jpg")
Case "Smith"
Image1.Picture = LoadPicture("C:\Test\Smith.jpg")
End Select

MrYemin09
11-23-2009, 07:07 AM
Hi, mdmackillop
This Code "Select Case " where to add?
I added this code listbox1 ,but do not work.
Please teach me!

Very thanks mdmackillop!

mdmackillop
11-23-2009, 07:46 AM
Add it at the end of UserForm Initialise code, before End Sub

MrYemin09
11-24-2009, 04:54 AM
Very thanks! mdmackillop
You have very high skill !
I respect you.