Good day!
Could you please help me on this matter, I have an excel file with many VBA codes and those codes are in Portuguese. how can I change this code to English?
your kind support would be highly appreciated.
Private Sub ToggleButton1_Click()
Dim aba As String
MostraAba ("FO35")
End Sub
Private Sub CommandButton2_Click()
'
' Apaga linha na Table5
'
Dim UltimaLinha As Long
Dim CelVinculada As Variant
Dim linha As Long
Dim rsp As Single
ActiveSheet.Unprotect
Application.ScreenUpdating = False
CelVinculada = Cells(3, 15).Value
'Ultima Linha salva na Tabela5
UltimaLinha = ActiveSheet.Cells(Rows.Count, 57).End(xlUp).Row
'Verifica se a data faz parte da tabela
For linha = 4 To UltimaLinha
If Cells(linha, 57).Value = CelVinculada Then
rsp = MsgBox("Deseja apagar o registro selecionado ?", vbYesNo, "Apagar Registro")
Select Case rsp
Case 6
Exit For
Case 7
Exit Sub
End Select
End If
If linha = UltimaLinha Then
rsp = MsgBox("Registro não encontrado", vbInformation)
Exit Sub
End If
Next linha
'
'Apaga a linha referente à CelVinculada
'
Range("Table5[DATE]").Select
Selection.ListObject.ListRows(linha - 3).Delete
'
'Seleciona outra linha para mostrar os dados
'
If UltimaLinha > 4 Then
CelVinculada = Cells(UltimaLinha - 1, 57).Value
Cells(3, 15).Value = CelVinculada
MostraSondagem (CelVinculada)
Range("F2").Select
Else
Range("A1, B2, F2, K1, K2, E4:E16, E18:E21, E23:E42, G23, G4:H21") = ""
Range("F2").Select
End If
Application.ScreenUpdating = True
ActiveSheet.Protect
End Sub
Private Sub CommandButton1_Click()
'
' Grava valores na tabela5
'
Dim SG(77), CelVinculada As Variant
Dim UltimaLinha, linha, escolha As Double
Dim i, coluna As Integer
ActiveSheet.Unprotect
Application.ScreenUpdating = False
'Dados do cabeçalho
SG(1) = Cells(2, 6) 'DATE
SG(2) = Cells(1, 1) 'TYPE
SG(3) = Cells(2, 2) 'PLACE
SG(4) = Cells(1, 11) 'D.FWD
SG(5) = Cells(2, 11) 'D.AFT
'Ultima Linha salva na Tabela5
lastrow = ActiveSheet.Cells(Rows.Count, 57).End(xlUp).Row
'Verifica se a data já foi salva na tabela
For Row = 4 To lastrow
If Cells(Row, 57).Value <> SG(1) Then
Row = Row + 1
Insert = lastrow + 1
Else
rsp = MsgBox("Essa data já foi salva na tabela, sobrepor ?", vbYesNo, "Salvar na tabela")
Select Case rsp
Case 6 'Yes
Insert = linha
Exit For
Case 7 'No
Exit Sub
End Select
End If
Next
'
'Grava na Table5
'
coluna = 57
For i = 1 To 77
Cells(escolha, coluna).Value = SG(i)
coluna = coluna + 1
Next i
'
'Mostra os dados
'
UltimaLinha = ActiveSheet.Cells(Rows.Count, 57).End(xlUp).Row
CelVinculada = Cells(UltimaLinha, 57).Value
MostraSondagem (CelVinculada)
Range("F2").Select
Application.ScreenUpdating = True
ActiveSheet.Protect
End Sub