I want to copy a template which contains a combo box from sheet "Change_Block" to the sheet "Scope_Changes" this will be one several times, so i don't know te combobox name upfront ..
I tried this in a macro .... but the " With Selection" gives the run time error 438: Object doesnt support this property or method
How to avoid this?
I tried this in a macro .... but the " With Selection" gives the run time error 438: Object doesnt support this property or method
How to avoid this?
Code:
Sub Add_Change()
'determine the row to start the new change block
Dim This_Sheet As String
Dim lr, r As Long
This_Sheet = "Scope_Changes"
Worksheets(This_Sheet).Activate
lr = Cells(Rows.Count, "I").End(xlUp).row
r = lr + 3
Sheets("Change_Block").Select
Rows("1:19").Select
Selection.Copy
Sheets("Scope_Changes").Select
Range("A" & r).Select
ActiveSheet.Paste
Sheets("Change_Block").Select
ActiveSheet.Shapes.Range(Array("ComboBox1")).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Scope_Changes").Select
Range("A" & r + 4).Select
ActiveSheet.Paste
With Selection
.LinkedCell = "E" & r + 3
.ListFillRange = Range("H" & r + 3).Value
End With
End Sub