B
Brian
Hello all,
I have a sheet containing a matrix of Cross references. Using the case
statement, I would like to be able to loop through each cell in the range,
double click to go to the sheet containing the data, select the row, then
paste into a report sheet. Guess what -I can't get it to work. Any
suggestions please.
This is one case statement from the code:
Private Sub ComboBox1_click()
ComboBox2.ListIndex = -1
ComboBox3.ListIndex = -1
ComboBox4.ListIndex = -1
ComboBox5.ListIndex = -1
Dim refrange As Range
Dim c As Range
Select Case ComboBox1.Value
Case "GSOP_0286"
Set refrange = Sheets("Sheet2").Range("A3:A20")
For Each c In refrange
Application.DoubleClick
With ActiveSheet
myRow = ActiveCell.Row
Rows(myRow).Select
Selection.Copy
Sheets("Report").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths,
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Paste
End With
Next c
Thanks,
I have a sheet containing a matrix of Cross references. Using the case
statement, I would like to be able to loop through each cell in the range,
double click to go to the sheet containing the data, select the row, then
paste into a report sheet. Guess what -I can't get it to work. Any
suggestions please.
This is one case statement from the code:
Private Sub ComboBox1_click()
ComboBox2.ListIndex = -1
ComboBox3.ListIndex = -1
ComboBox4.ListIndex = -1
ComboBox5.ListIndex = -1
Dim refrange As Range
Dim c As Range
Select Case ComboBox1.Value
Case "GSOP_0286"
Set refrange = Sheets("Sheet2").Range("A3:A20")
For Each c In refrange
Application.DoubleClick
With ActiveSheet
myRow = ActiveCell.Row
Rows(myRow).Select
Selection.Copy
Sheets("Report").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteColumnWidths,
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Paste
End With
Next c
Thanks,