Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sheets("Menajeria offline").Activate
- If Range("E6") = "" Then
- MsgBox "pon tu nombre ya coach"
- Else
- If Range("C10") = "" Then
- MsgBox "Por favor el mes ya coach"
- Else
- Sheets("Sheet5").Activate
- For Each cell In Range("A2:O2")
- If cell.Value = "" Then
- count = count + 1
- End If
- Next
- If count > 0 Then
- MsgBox "Hay que rellenar todos los campos", vbInformation, "Error"
- Else
- Sheets("Sheet5").Activate
- Range("A2").Select
- Range(Selection, Selection.End(xlToRight)).Select
- Selection.Copy
- Sheets("Sheet5").Activate
- file = Left(file, Position)
- Set db = OpenDatabase(ThisWorkbook.Path & "Database1.mdb")
- ' open the database
- *Set rs = db.OpenRecordset("Tracker2", dbOpenTable)* (error here)
- ' get all records in a table
- r = 2 ' the start row in the worksheet
- Do While Len(Range("A" & r).Formula) > 0
- ' repeat until first empty cell in column A
- With rs
- .AddNew ' create a new record
- ' add values to each field in the record
- .Fields("User") = Range("A" & r).Text
- .Fields("Advisor Name") = Range("B" & r).Text
- .Fields("Email") = Range("C" & r).Text
- .Fields("Direct Manager") = Range("d" & r).Text
- .Fields("Manager E-mail") = Range("e" & r).Text
- .Fields("Quality coach") = Range("f" & r).Value
- .Fields("Date of Submission") = Range("g" & r).Text
- .Fields("Tipo de auditoria") = Range("h" & r).Text
- .Fields("Day") = Range("i" & r).Text
- .Fields("Month") = Range("j" & r).Text
- .Fields("Year") = Range("k" & r).Text
- .Fields("Número") = Range("l" & r).Text
- .Fields("Motivo de Contacto") = Range("m" & r).Text
- .Fields("Submotivo de Contacto") = Range("n" & r).Text
- .Fields("Saludo") = Range("o" & r).Text
- .Fields("Política de Seguridad") = Range("p" & r).Text
- .Fields("Resolución") = Range("Q" & r).Text
- .Fields("Seguir procedimiento") = Range("R" & r).Text
- .Fields("Nota") = Range("S" & r).Text
- .Fields("Tipificacion") = Range("T" & r).Text
- .Fields("Despedida") = Range("U" & r).Text
- .Fields("Ofrecer Alternativas") = Range("v" & r).Text
- .Fields("Seguimiento") = Range("w" & r).Text
- .Fields("Saludo razon ") = Range("x" & r).Text
- .Fields("Política de Seguridad razon") = Range("y" & r).Text
- .Fields("Resolución razon") = Range("z" & r).Text
- .Fields("Seguir procedimiento razon") = Range("aa" & r).Text
- .Fields("Nota razon") = Range("ab" & r).Text
- .Fields("Tipificacion razon") = Range("ac" & r).Text
- .Fields("Despedida razon") = Range("ad" & r).Text
- .Fields("Ofrecer Alternativas razon") = Range("ae" & r).Text
- .Fields("Seguimiento razon") = Range("af" & r).Text
- .Fields("Saludo comentario") = Range("ag" & r).Text
- .Fields("Política de Seguridad comentario") = Range("ah" & r).Text
- .Fields("Resolución comentario") = Range("ai" & r).Text
- .Fields("Seguir procedimiento comentario") = Range("aj" & r).Text
- .Fields("Nota comentario") = Range("ak" & r).Text
- .Fields("Tipificacion comentario") = Range("al" & r).Text
- .Fields("Despedida comentario") = Range("am" & r).Text
- .Fields("Ofrecer Alternativas comentario") = Range("an" & r).Text
- .Fields("Seguimiento comentario") = Range("ao" & r).Text
- .Fields("Explicacion/ comunicacion clara y efectiva") = Range("ap" & r).Text
- .Fields("Habilidades Comunicativas") = Range("aq" & r).Text
- .Fields("Ortografía y gramatica ") = Range("ar" & r).Text
- .Fields("Vodafone Marca Admirada") = Range("as" & r).Text
- .Fields("Explicacion/ comunicacion clara y efectiva razon 1") = Range("at" & r).Value
- .Fields("Explicacion/ comunicacion clara y efectiva razon 2") = Range("au" & r).Text
- .Fields("Explicacion/ comunicacion clara y efectiva razon 3") = Range("av" & r).Value
- .Fields("Explicacion/ comunicacion clara y efectiva razon 4") = Range("aw" & r).Value
- .Fields("Explicacion/ comunicacion clara y efectiva razon 5") = Range("ax" & r).Text
- .Fields("Habilidades Comunicativas razon 1") = Range("ay" & r).Text
- .Fields("Habilidades Comunicativas razon 2") = Range("az" & r).Text
- .Fields("Habilidades Comunicativas razon 3") = Range("ba" & r).Text
- .Fields("Habilidades Comunicativas razon 4") = Range("bb" & r).Text
- .Fields("Habilidades Comunicativas razon 5") = Range("bc" & r).Text
- .Fields("Ortografía y gramatica razon 1") = Range("bd" & r).Text
- .Fields("Ortografía y gramatica razon 2") = Range("be" & r).Text
- .Fields("Ortografía y gramatica razon 3") = Range("bf" & r).Text
- .Fields("Ortografía y gramatica razon 4") = Range("bg" & r).Text
- .Fields("Ortografía y gramatica razon 5") = Range("bh" & r).Text
- .Fields("Ortografía y gramatica razon 6") = Range("bi" & r).Text
- .Fields("Explicacion/ comunicacion clara y efectiva comentario") = Range("bj" & r).Text
- .Fields("Habilidades Comunicativas comentario") = Range("bk" & r).Text
- .Fields("Ortografía y gramatica comentario") = Range("bl" & r).Text
- .Fields("Vodafone Marca Admirada comentario") = Range("bm" & r).Text
- .Fields("Resumen del caso") = Range("bn" & r).Text
- .Fields("Customer obsessed") = Range("bo" & r).Text
- .Fields("Customer obsessed comentario") = Range("bp" & r).Text
- .Fields("Score") = Range("bq" & r).Text
- .Fields("Rate") = Range("br" & r).Text
- .Fields("Total Critical") = Range("bs" & r).Text
- .Fields("Total Non-Critical") = Range("bt" & r).Text
- ' add more fields if necessary...
- .Update ' stores the new record
- End With
- r = r + 1 ' next row
- Loop
- rs.Close
- Set rs = Nothing
- db.Close
- Set db = Nothing
- Range("DO82") = ""
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement