Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Assistance needed to test for open file in a different direct | Excel Discussion (Misc queries) | |||
VBA Assistance Needed | Excel Discussion (Misc queries) | |||
Pivot Table Assistance Needed | Excel Worksheet Functions | |||
Pivot Table Assistance Needed | Excel Worksheet Functions | |||
Assistance with code Please | Excel Discussion (Misc queries) |