Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
*First.* I want to format a range of cells (sheet1 B8:K22) so that whenever a cell in the range is clicked the colour format,of the partial row the cell relates to, is changed. e.g I click on cell D8 and the cells D8:K8 change colour. If I click on a new cell in a different row then I want the previous selected row to return to its original colour. *Second.* When I double click on any cells in the range B8:B22 on my worksheet (sheet1) I want user form1 to initiate with the text from the cell I double clicked transposed to combobox1 on my userform. Rob van Gelder kindly provided a code to achieve this with another worksheet I have. It works perfectly for that worksheet but I can't seem to get it to work on this one. I'll post the code at the end of this message. *Third.* When I select a value from my combo box1 on user form1 I want the cell the selection refers to (Range=Sheet1 B8:B22 ( + the next 9 cells across)) highlighted with a colour change or similar. With all of these cell "highlights" I want the format to return to the original when a new selection is made. Regards gregork Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim frm As UserForm2 Set frm = New UserForm2 frm.ComboBox1.AddItem Target.Value With frm.ComboBox1: .ListIndex = .ListCount - 1: End With frm.Show Set frm = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Christmas Wishes | Excel Discussion (Misc queries) |