Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 65
Default CODE Assistance needed PLEASE please please

Hi. Anyone can disect this code and see whats wrong with it. When I hit
debug, it highlights the 5th line in the first paragraph.
I need the listbox in sheet1 to get the values in sheet ("database") and
once I click the command button in the userform I need it to display the list
values in ListBox1 on an array style ( a row with the values) on sheet 1.
This is what I came up with:
I just cant get the values selected in the listbox to show in a row style in
sheet 1.


Public Sub Closefrm1_Click()
NumColumns= ListBox1.ListCount
Set rng=Sheet1.Range("Header")
rng.Clear
rng.Resize(1,NumCoulumns).Name=Sheet1.Range("Heade r")

k=0
For Each cell in Sheet1.Range("Header")
Cell.Value=ListBox1.List(k)
K=K+1

ListBox1.Clear
ListBox2.Clear

UserForm1.Hide
End Sub
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
VBA Assistance needed to test for open file in a different direct Brent E Excel Discussion (Misc queries) 2 April 30th 07 11:39 PM
VBA Assistance Needed RalphB Excel Discussion (Misc queries) 5 February 22nd 06 07:16 PM
Pivot Table Assistance Needed Barb R. Excel Worksheet Functions 4 May 11th 05 05:11 PM
Pivot Table Assistance Needed Barb R. Excel Worksheet Functions 0 May 11th 05 02:51 PM
Assistance with code Please Greg B... Excel Discussion (Misc queries) 8 March 2nd 05 11:55 PM


All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"