Bienvenido a la mayor comunidad de usuarios EXCEL

Regístrate gratis ahora para ver contenidos y descargas sin restricciones!

Regístrate gratis

Actualizar por textbox y combobox

Diksonk9

New member
Registrado
22 Mar 2023
Mensajes
7
Buenos días.
Soy algo nuevo por acá.
Estoy desarrollando un proyecto y necesito actualizar registros mediante 2 condiciones: Un textbox y un combobox.
Sin permisos de acceso

En mi...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Solución
Código:
Private Sub BtnREGISTRAR_Click()
Dim LINEA As Integer, Encontrado As Boolean
With Sheets("DATALABORES")
   For LINEA = 3 To .Range("A" & Rows.Count).End(xlUp).Row
   If .Range("A" & LINEA) = FrmREGISTRO.CODCAMPO And _
      .Range("G" & LINEA) = FrmREGISTRO.CboCULTIVO Then
      .Range("JL" & LINEA).Value = Me.VISITA1.Value
      .Range("JN" & LINEA).Value = Me.POR1.Value
      .Range("JO" & LINEA).Value = Me.VISITA2.Value
      .Range("JQ" & LINEA).Value = Me.POR2.Value
      .Range("JR" & LINEA).Value = Me.VISITA3.Value
      .Range("JT" & LINEA).Value = Me.POR3.Value
      .Range("JU" & LINEA).Value = Me.VISITA4.Value
      .Range("JW" & LINEA).Value = Me.POR4.Value
      .Range("JX" & LINEA).Value = Me.JABAS.Value...
Código:
Private Sub BtnREGISTRAR_Click()
Dim LINEA As Integer, Encontrado As Boolean
With Sheets("DATALABORES")
   For LINEA = 3 To .Range("A" & Rows.Count).End(xlUp).Row
   If .Range("A" &...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
  • Me gusta
Reacciones: FGV
Hola @Diksonk9 (y Antoni),
Como vi que trabajas con los datos en Tablas de Excel, yo lo hice con sintaxis ListObjects. Un saludo, Fernando
Código:
Private Sub...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Última edición:
Volver
Arriba