SHARE
TWEET

Untitled

a guest Jun 17th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Captura_ficha()
  2.    Dim TransRowRng As Range
  3.    Dim NewRow As Integer
  4.    Dim i As Integer
  5.    Dim Valor As String
  6.    Dim Valor1 As String
  7.    Dim RwLast As Long
  8.  
  9.    strTitulo = "Ficha de registro"
  10.  
  11.    For i = 1 To 5
  12.        If Sheets("REGISTRO").Range("ficha" & i).Value = "" Then
  13.            Valor = Sheets("REGISTRO").Range("ficha" & i).AddressLocal
  14.            Valor1 = Valor1 & vbNewLine & Valor
  15.        End If
  16.    Next i
  17.  
  18.    RwLast = Range("A100").End(xlUp).Row
  19.  
  20.    If RwLast < 100 Then
  21.        Set TransRowRng = ThisWorkbook.Worksheets("LISTA").Cells(1, 1).CurrentRegion
  22.        NewRow = TransRowRng.Rows.count + 1
  23.        With ThisWorkbook.Worksheets("LISTA")
  24.           .Cells(NewRow, 1).Value = [ficha0]
  25.           .Cells(NewRow, 2).Value = [ficha2]
  26.           .Cells(NewRow, 3).Value = [ficha3]
  27.           .Cells(NewRow, 4).Value = [ficha4]
  28.           .Cells(NewRow, 5).Value = [ficha5]
  29.        End With
  30.        MsgBox "SE GRABĂ“ CORRECTAMENTE.", vbOKOnly + vbInformation, strTitulo
  31.     Else
  32.        MsgBox "HA LLEGADO EL LIMITE DE REGISTRO. POR FAVOR NOTIFIQUE AL ADMINISTRADOR", vbOKOnly + vbInformation, strTitulo
  33.     End If
  34. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top