LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Transfering Data from ListBox to Worksheet



"Dick Kusleika" wrote:

Ronbo

Well, Dave was right. I thought the Value property of the Listbox would
give you an error in a mulitselect listbox, but it's just Null.

First, Sheet1 is the CodeName of the sheet, not the name. Sheet1's name is
RESULTS. Sheet2's name is "Sheet1" Look at the Project Explorer (Cntl+R)
to see how that works.

Here's the code that you need

Private Sub OKButton_Click()

Dim i As Long

For i = 0 To Me.ListBox1.ListCount - 1
If Me.ListBox1.Selected(i) Then
Worksheets("Sheet1").Range("B43").End(xlUp) _
.Offset(1, 0).Value = Me.ListBox1.List(i)
End If
Next i

Unload Me

End Sub

That looks like a very useful spreadsheet you're building.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


Ronbo wrote:
"Dave Peterson" wrote:

Dick's address is in the header:

"Dick Kusleika"

ps. When I turned off smart quotes in MSWord, it fixed the apostrophe
problem, too.

Your apostrophes still look funny.

Ronbo wrote:
<<snipped

What is your e-mail address? If you want you can e-mail it to me at
ronbowman32@aol.
Its 10:30 CT. I will be back in about two hours and will e-mail it
then if I have an address.

Thanks



--

Dave Peterson



Dave -


Thanks


Dick -


I just got your last response. I was looking for an e-mail reply and just
came back here and found you last response.

It WORKS PERFECT!!!

Thanks a lot for your help, time, patiance and expertise.

As for the sheet name, I named it sheet1 as to not make it more confusing by
changing names through this discussion.

Ronbo

P.S. Thanks a lot to Dave P. also

 
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
Transfering of data from 1 worksheet to another nandosuperstar Excel Discussion (Misc queries) 2 October 31st 09 12:33 AM
Transfering data from worksheet to another Tasha Excel Discussion (Misc queries) 0 May 15th 06 03:20 PM
Transfering a row of data to a template word or worksheet Marc Williams Excel Discussion (Misc queries) 1 October 27th 05 12:33 AM
Transfering data from 1 worksheet to another Larry L Excel Discussion (Misc queries) 1 August 29th 05 01:30 PM
Transfering data from one worksheet to another Worksheet sryan Excel Programming 0 January 21st 04 12:41 PM


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