Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/05/2008, 15:08
Avatar de abrahamvj
abrahamvj
 
Fecha de Ingreso: julio-2006
Ubicación: Lima, Peru
Mensajes: 708
Antigüedad: 17 años, 9 meses
Puntos: 18
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