Hello all,
I'm new to vba so after any advice please. What I would like to do is when J29 is changed which is a validation list then run a query based on the selection and paste the recordset into J30
So far I have
Private sub Workbook_SheetChange
Dim Cn as Adodb.connection
Dim rst as new Adodb.recordset
Set Cn = new Adodb.connection
Cn.open "this is obviously link to my database"
Rst.open "select site from qy_6_6_1 where service centre = '" & range("j29") & "'", cn
This workbook.worksheets("network summary").range("j30").copyfromrecordset rst
Rst. Close
Cn. Close
End sub
Look forward to you pointing me in the right direcrion
Cheers
Bookmarks