Consulta Datos

Solo consultas sobre macros y código VBA Excel.

Reglas del Foro
1. Antes de hacer tu pregunta intenta con el buscador de este foro (muchas preguntas ya fueron respondidas antes!)
2. Si haces una nueva pregunta, es muy recomendable que adjuntes el ejemplo Excel para poder comprenderla mejor!
3. Realiza tu pregunta de forma clara, explicando bien cada paso de lo que haces y tendrás más probabilidad de respuesta!
Compartir en:
     

Consulta Datos

Notapor ALDO MALAVER PRIETO » 24 Oct 2006 12:01

POR FAVOR QUIERO QUE ME AYUDEN.
QUIERO GARDAR UNOS DATO DESDE UN DISEÑO DE UN FORMULARIO CON LOS SGTE:
NOMBRES Y APELLIDOS DESDE UN COMBO ADDITEM DESDE INICIALIZACION DEL FORMULARIO.
FICHA: TEXTBOX
LUGAR: TEXTBOX
OBSERVACIONES: TEXTBOX
BOTONES DE COMANDO NUEVO, GRABAR , SALIR
EL PROBLEMA ES COMO PUEDO PROGRAMAR EL BOTON GRABAR PARA QUE LO ENVIE A UNA HOJA xx, Y DESPUES CUANDO INGRESE UNO NUEVO LO ENVIE A LA OTRA CELDA HACIA ABAJO, ADJUNTO EL ARCHIVO
LE AGRADECERE EXCELICIONISTAS
ALDO-PERU
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.
* Te recomendamos estos productos Excel: Manual de Macros | Manual de Funciones | Nuevas Funciones | ddTraDa
ALDO MALAVER PRIETO
Miembro Frecuente
Miembro Frecuente
 
Registrado: 20 Sep 2004 17:46
Ubicación: peru

Re: Consulta Datos

Notapor Tavo77 » 24 Oct 2006 12:16

Esto te puede servir de ayuda (debes pegarlo en el código del userform1):
Código: Seleccionar todo
Private Sub CommandButton1_Click()
        UserForm1.ComboBox1.Value = ""
        UserForm1.TextBox2.Value = ""
        UserForm1.TextBox3.Value = ""
        UserForm1.TextBox4.Value = ""
        UserForm1.TextBox5.Value = ""
End Sub

Private Sub CommandButton2_Click()
        miHoja = "Hoja1"
        Sheets(miHoja).Select
        Cells(1, 1).Select
        If Cells(2, 1).Value = "" Then
            ultimaFila = 2
        Else
            Selection.End(xlDown).Select
            ultimaFila = Selection.Row + 1
        End If
        Sheets(miHoja).Cells(ultimaFila, 1).Value = UserForm1.ComboBox1.Value
        Sheets(miHoja).Cells(ultimaFila, 2).Value = UserForm1.TextBox2.Value
        Sheets(miHoja).Cells(ultimaFila, 3).Value = UserForm1.TextBox3.Value
        Sheets(miHoja).Cells(ultimaFila, 4).Value = UserForm1.TextBox4.Value
        Sheets(miHoja).Cells(ultimaFila, 5).Value = UserForm1.TextBox5.Value
End Sub
* Te recomendamos estos productos Excel: Manual de Macros | Manual de Funciones | Nuevas Funciones | ddTraDa
Avatar de Usuario
Tavo77
Miembro Frecuente
Miembro Frecuente
 
Registrado: 25 Ago 2005 20:43
Ubicación: Costa Rica

Re: Consulta Datos

Notapor ALDO MALAVER PRIETO » 24 Oct 2006 13:33

TE AGRADESCO , MUY AGRADECIDO AMIGO , MAS BIEN INGRESO LOS DATOS EN LLENA HASTA LA 2DA. FILA LUEGO LOS TERCEROS DATO CHANCA EL 2DA FILA, EN CONCLUCION SOLO INGRESA 2 DATOS, COMO PUEDO MEJORARLO,PARA INGRESAR MAS DATOS, ASI MIMO QUE PUEDO HACER EN EL CAMPO OBSERVACIONES QUE ES UN TEXTBOX PARA INGRESE SOLO 20 DIGITOS Y A SU VEZ LO ENVIE A LA HOJA DE CALCULO PARA AMPLIARB LA CELDA, Y POSTERIOR LLEGADO LOS 20 DIGITOS AMLIE LA CELDA HACIA ABAJO.... ESPERO SU RESPUESTA EXCELUCIONISTA.
GRACIAS
* Te recomendamos estos productos Excel: Manual de Macros | Manual de Funciones | Nuevas Funciones | ddTraDa
ALDO MALAVER PRIETO
Miembro Frecuente
Miembro Frecuente
 
Registrado: 20 Sep 2004 17:46
Ubicación: peru

Re: Consulta Datos

Notapor tooper666 » 24 Oct 2006 15:00

Saludos ALDO MALAVER PRIETO.
Te envio tu archivo con algunas modificaciones... lo revisas y me comentas.
Suerte.
No tiene los permisos requeridos para ver los archivos adjuntos a este mensaje.
* Te recomendamos estos productos Excel: Manual de Macros | Manual de Funciones | Nuevas Funciones | ddTraDa
Avatar de Usuario
tooper666
Miembro Frecuente
Miembro Frecuente
 
Registrado: 07 Mar 2005 19:56

Re: Consulta Datos

Notapor ALDO MALAVER PRIETO » 24 Oct 2006 16:57

OK ,AMIGO MUY AGRADECIDO ETERNAMENTE, MAS BIEN VOY IR MEJORANDO Y TE VOY COMUNICANDO,
CONSULTA COMO DEFINO UN TEXTBOX CON EL MULTILINE , ECROLL BAR CON LAS PROPIEDADES EN EL EXCELL NO ME RESPONDE, EN VB SALA OK.

GRACIAS
* Te recomendamos estos productos Excel: Manual de Macros | Manual de Funciones | Nuevas Funciones | ddTraDa
ALDO MALAVER PRIETO
Miembro Frecuente
Miembro Frecuente
 
Registrado: 20 Sep 2004 17:46
Ubicación: peru


Compartir en:
     

  • Anuncio
Manual Excel avanzado

Volver a Macros

¿Quién está conectado?

Usuarios navegando por este Foro: Bing [Bot] y 4 invitados