Hello to all,
I am working on a project that you have measurement results on the sheets and on the main sheet you can see these results with combobox selection.
I tried to do something but I have compile error 1004 message
Code
Private Sub ComboBox1_Change()
'Updateby Extendoffice
If ComboBox1.ListIndex > -1 Then
Application.DisplayAlerts = False
wb1 = ComboBox1.Text
Dim i As Long
Dim y As Long
y = 9
For i = 19 To 40
Worksheets(wb1).Range("A", i).Copy
Worksheets("Sheet1").Range("L", y).PasteSpecial Paste:=xlPasteValues
y = y + 1
Next i
End If
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim xSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Application.EnableEvents = False
If ComboBox1.ListCount <> ThisWorkbook.Sheets.Count Then
ComboBox1.Clear
For Each xSheet In ThisWorkbook.Sheets
ComboBox1.AddItem xSheet.Name
Next xSheet
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Display More