MrcFz
23-04-2022 17:01:44
Olá,
Sou novato em VBA, uso o Excel 2010, numa macro que estou desenvolvendo, tenho a Sub Encaixe() que faz o encaixe numa planilha agenda.
Para inserir esse encaixe tenho que testar a reserva atual e validar se essa reserva contem uma série de palavras chave que não permitiriam o encaixe, para isso escrevi o código a seguir:
If ActiveCell = ("Descanso" Or "Dia" Or "Médico" Or "Visita" Or "Pessoal" Then GoTo Inicio Else
If ActiveCell = ("Projeto") Then
ActiveCell.Select
Selection.Cut
ActiveCell.Range("CCelula").Select
ActiveSheet.Paste
ActiveCell.Range("CCelula").Select
Selection.Copy
ActiveCell.Range("CCelula").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Else GoTo Inicio
End If
End If
Não consigo achar ou entender o que está errado, agradeço a ajuda,
Mrc
Sou novato em VBA, uso o Excel 2010, numa macro que estou desenvolvendo, tenho a Sub Encaixe() que faz o encaixe numa planilha agenda.
Para inserir esse encaixe tenho que testar a reserva atual e validar se essa reserva contem uma série de palavras chave que não permitiriam o encaixe, para isso escrevi o código a seguir:
If ActiveCell = ("Descanso" Or "Dia" Or "Médico" Or "Visita" Or "Pessoal" Then GoTo Inicio Else
If ActiveCell = ("Projeto") Then
ActiveCell.Select
Selection.Cut
ActiveCell.Range("CCelula").Select
ActiveSheet.Paste
ActiveCell.Range("CCelula").Select
Selection.Copy
ActiveCell.Range("CCelula").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Else GoTo Inicio
End If
End If
Não consigo achar ou entender o que está errado, agradeço a ajuda,
Mrc