Make it a function that accepts 4 arguments: intSession, intVessel, strPosition, strPressure.then these lines will look like:.Parameters.Append .CreateParameter("@Session", adInteger, adParamInput, , cint(intSession)).Parameters.Append .CreateParameter("@Vessel", adInteger, adParamInput, , cint(intVessel)).Parameters.Append .CreateParameter("@Position", adVarChar, adParamInput, 5, cstr(strPosition)).Parameters.Append .CreateParameter("@Pressure", adVarChar, adParamInput, 5, cstr(strPressure))