Ayuda con copilacion para formulario
Publicado por edgardo (1 intervención) el 28/08/2015 03:06:04
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Sub GardarInformacion()
Rem Declaración de variables
Dim Contfila As Long
Dim hoja As Worksheet
Set hoja = Worksheets(2)
Rem Validamos que todos los espacios esten llenos"
If Trim$(Nombre) = Empty Or Trim$(Actividad) = Empty Or Trim$(Objetivo) = Empty Or Trim$(Participantes) = Empty Or Trim$(FechaInicio) = Empty Or Trim$(Fechafinaliza) = Empty Or Trim$(NúmerosDías) = Empty Or Trim$(Requerimientos) = Empty Or Trim$(Observaciónes) = Empty Then
MsgBox "Por favor complete los datos", vbCritical, "Datos Incompletos"
Exit Sub
End If
Rem " validad la fila donde va a estar la infrormación"
Contfila = hoja.Cells(RowCount, 1).End(xlUp).Offset(1, 0).Row
hoja.Cells(Contfila, 1).Value = Me.Nombre.Value
hoja.Cells(Contfila, 2).Value = Me.Actividad.Value
hoja.Cells(Contfila, 3).Value = Me.Objetivo.Value
hoja.Cells(Contfila, 4).Value = Me.Participantes.Value
hoja.Cells(Contfila, 5).Value = Me.FechaInicio.Value
hoja.Cells(Contfila, 6).Value = Me.Fechafinaliza.Value
hoja.Cells(Contfila, 7).Value = Me.NúmerosDías.Value
hoja.Cells(Contfila, 8).Value = Me.Requerimientos.Value
Rem " Limpiar casillas
Me.Nombre.Value = ""
Me.Actividad.Value = ""
Me.Objetivo.Value = ""
Me.Participantes.Value = ""
Me.FechaInicio.Value = ""
me da error de No se encontro el metodo
Valora esta pregunta


0