Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to change this macro so result isn't in listbox but on sheet1
starting with cell E1. Private Sub UserForm_Initialize() Dim cell As Range Dim sh As Worksheet With Me .ListBox1.RowSource = "" .ListBox1.ColumnCount = 3 .ListBox1.Clear End With Set sh = Worksheets("Ark1") For Each cell In sh.Range("A10:A250") If cell.Value = sh.Range("A5").Value Then With UserForm1 .ListBox1.AddItem cell.Value .ListBox1.List(.ListBox1.ListCount - 1, 1) _ = cell.Offset(0, 2).Value .ListBox1.List(.ListBox1.ListCount - 1, 2) _ = cell.Offset(0, 5).Value End With End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
Insert row at change macro - how to change it. | Excel Discussion (Misc queries) | |||
macro that will change the font of a cell if i change a value | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
How do I change macro text with another macro? | Excel Discussion (Misc queries) |