ws column range to listbox

stapuff

Well-known Member
Joined
Feb 19, 2004
Messages
1,126
I can get ListBox1 to populate, but lost on the rest.
On UF_Initialize ListBox1 is populated with the sheet names from Expedites.xls
On ListBox1_Click I would like to go to that sheet name and populate Listbox2 with C2:C from the sheet selected?
Then on CommandButton1_Click select the row ListBox2's value is from, highlight the row A:O yellow and delete the value in M for that row.


Any help would be appreciated.

Thanks,

Kurt


Example:

LB1 has Jun 04, Jul 04, Aug 04, Sep 04 in it.

Jul 04 is selected.

Range C2:C shows in LB2 from sheet Jul 04.

15240 is selected in LB2 (which is row 25 of sheet Jul 04)

Row 25 (A:O) from sheet Jul 04 is highlighted yellow and m25 value is deleted.


Private Sub UserForm_Initialize()
Dim Ws As Worksheet
Me.ListBox1.Clear
Workbooks.Open ("F:\Customer Service\Expedites.xls")
For Each Ws In ActiveWorkbook.Worksheets
Me.ListBox1.AddItem Ws.Name
Next Ws
End Sub
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,215,561
Messages
6,125,533
Members
449,236
Latest member
Afua

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top