Ver Mensaje Individual
Antiguo 09-may-2008, 15:08   #4 (permalink)
abrahamvj
abrahamvj tiene algunos puntos positivos de karma
 
Avatar de abrahamvj
 
Fecha de Ingreso: julio-2006
Ubicación: Lima, Peru
Mensajes: 502
Re: duda en macro de excel

Listo, como ya dije antes, no es lo optimo, pero segui tus parametros y te servira:

Private Sub CommandButton1_Click()
Dim hoja As String
Dim falta As String
Dim lugar As String
Dim reporto As String
Dim fecha As String

hoja = InputBox("Coloca el nombre de la hoja", "Hoja")
falta = InputBox("Tipo de falta:", "especificar")
lugar = InputBox("Lugar donde se sucito:", "especificar")
reporto = InputBox("quien reporto:", "especificar")
fecha = InputBox("fecha de reporte:", "fecha")
strMsg = "Su reporte fue creado"
MsgBox strMsg

Worksheets(hoja).Select

Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell = falta
ActiveCell.Offset(0, 1) = lugar
ActiveCell.Offset(0, 2) = reporto
ActiveCell.Offset(0, 3) = fecha
End Sub

Abraham
abrahamvj está desconectado   Responder Citando