Ошибка времени выполнения 1004 с определенной приложением или ошибкой, определенной объектом - PullRequest
0 голосов
/ 24 октября 2019

ошибка времени выполнения 1004 с ошибкой приложения или объекта

Private Sub commandB_Click() 'whatever your current sub is called.
Dim LastRow As Long, VKS As Worksheet
    Dim NEXTROW As Long
    Dim oCol As Long
    Dim myCell As Range
    Dim i As Integer

Set VKS = Worksheets("Outputdata")
LastRow = VKS.Range("B" & Rows.Count).End(xlUp).Row + 1 'Finds the last blank row
For i = 2 To VKS.Cells(Rows.Count, "B").End(xlUp).Row + 1
  VKS.Cells(i, "A").Value = i - 1
  If VKS.Cells(i, "B").Value <> "" Then
  End If
Next i

With VKS
.Range("B" & LastRow).Value = Format(Now, "mm/dd/yyyy hh:mm:ss")
.Range("C" & LastRow).Value = Application.UserName
.Range("D" & LastRow).Value = ID.Text 'Adds the TextBox3 into Col D & Last Blank Row
.Range("E" & LastRow).Value = IC.Text 'Adds the TextBox3 into Col E & Last Blank Row
.Range("F" & LastRow).Value = QTY.Text 'Adds the TextBox3 into Col F & Last Blank Row
.Range("G" & LastRow).Value = PRJ.Text 'Adds the TextBox3 into Col G & Last Blank Row
.Range("H" & LastRow).Value = IOS.Text 'Adds the TextBox3 into Col H & Last Blank Row
.Range("I" & LastRow).Value = ComboBox1.Text 'Adds the TextBox3 into Col I & Last Blank Row
.Range("J" & LastRow).Value = SHIFT.Text 'Adds the TextBox3 into Col J & Last Blank Row
End With

End Sub
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...