Script Brasil

Código: Erro de Compilação, Sintaxe

Gostaria de saber como faço para dar continuidade a célula na macro pois como ficou muito extensiva dá os erros apontados no título. Exemplo abaixo
Sub MacroTESTE()
Dim dia_atual, msgembox As String
dia_atual = [B65]
msgmbox = MsgBox("Deseja abrir um novo dia? Os dados anteriores serão apagados.", vbInformation + vbYesNo + vbDefaultButton2, "Abrir dia")
If msgmbox = vbNo Then
Exit Sub
End If
Range("J64:K76").Copy
Range("J64:K76").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range("D17:AX17,D27:AX27,D38:AX38,D49:AX49,D60:AX60,D67:H67,M67:AX67,D73:H73,M73:AX73,D79:H79,M79:AX79,D86:AX86,D93:AX93,D100:AX100,D108:AX108,D115:AX115,D122:AX122").ClearContents
Range("A65").Select
If ActiveSheet.Range("B66").Value = 1 Then
[J64].FormulaR1C1 = "=SUM(R[-49]C[-6]+R[-49]C[-3]+R[-49]C+R[-49]C[3]+R[-49]C[6]+R[-49]C[9]+R[-49]C[12]+R[-49]C[15]+R[-49]C[18]+R[-49]C[21]+R[-49]C[24]+R[-49]C[27]+R[-49]C[30]+R[-49]C[33]+R[-49]C[36]+R[-49]C[39]+R[-39]C[-6]+R[-39]C[-3]+R[-39]C+R[-39]C[3]+R[-39]C[6]+R[-39]C[9]+R[-39]C[12]+R[-39]C[15]+R[-39]C[18]+R[-39]C[21]+R[-39]C[24]+R[-39]C[27]+R[-39]C[30]+R[-39]C[33]+R[-39]C[36]+R[-39]C[39]+R[-28]C[-6]+R[-28]C[-3]+R[-28]C+R[-28]C[3]+R[-28]C[6]+R[-28]C[9]+R[-28]C[12]+R[-28]C[15]+R[-28]C[18]+R[-28]C[21]+R[-28]C[24]+R[-28]C[27]+R[-28]C[30]+R[-28]C[33]+R[-28]C[36])"
R[-28]C[39]+R[-17]C[-6]+R[-17]C[-3]+R[-17]C+R[-17]C[3]+R[-17]C[6]+R[-17]C[9]+R[-17]C[12]+R[-17]C[15]+R[-17]C[18]+R[-17]C[21]+R[-17]C[24]+R[-17]C[27]+R[-17]C[30]+R[-17]C[33]+R[-17]C[36]+R[-17]C[39]+R[-6]C[-6]+R[-6]C[-3]+R[-6]C+R[-6]C[3]+R[-6]C[6]+R[-6]C[9]+R[-6]C[12]+R[-6]C[15]+R[-6]C[18]+R[-6]C[21]+R[-6]C[24]+R[-6]C[27]+R[-6]C[30]+R[-6]C[33]+R[-6]C[36]+R[-6]C[39]+R[1]C[-6]+R[1]C[-3]+R[1]C[3]+R[1]C[6]+R[1]C[9]+R[1]C[12]+R[1]C[15]+R[1]C[18]+R[1]C[21]+R[1]C[24]+R[1]C[27]+R[1]C[30]+R[1]C[33]+R[1]C[36]+R[1]C[39]+R[7]C[-6]+R[7]C[-3]+R[7]C[3]+R[7]C[6]+R[7]C[9]+R[7]C[12]+R[7]C[15]+R[7]C[18]+R[7]C[21]+R[7]C[24]+R[7]C[27]+R[7]C[30]+R[7]C[33]+R[7]C[36]=R[7]C[39]+R[13]C[-6]+R[13]C[-3]+R[13]C[3]+R[13]C[6]+R[13]C[9]+R[13]C[12]+R[13]C[15]+R[13]C[18]+R[13]C[21]+R[13]C[24]+R[13]C[27]+R[13]C[30]+R[13]C[33]+R[13]C[36]+R[13]C[39]+R[20]C[-6]+R[20]C[-3]+R[20]C+R[20]C[3]+R[20]C[6]+R[20]C[9]+R[20]C[12]+R[20]C[15]+R[20]C[18]+R[20]C[21]) _
R[20]C[24]+R[20]C[27]+R[20]C[30]+R[20]C[33]+R[20]C[36]+R[20]C[39]+R[27]C[-6]+R[27]C[-3]+R[27]C+R[27]C[3]+R[27]C[6]+R[27]C[9]+R[27]C[12]+R[27]C[15]+R[27]C[18]+R[27]C[21]+R[27]C[24]+R[27]C[27]+R[27]C[30]+R[27]C[33]+R[27]C[36]+R[27]C[39]+R[34]C[-6]+R[34]C[-3]+R[34]C+R[34]C[3]+R[34]C[6]+R[34]C[9]+R[34]C[12]+R[34]C[15]+R[34]C[18]+R[34]C[21]+R[34]C[24]+R[34]C[27]+R[34]C[30]+R[34]C[33]+R[34]C[36]+R[34]C[39]+R[42]C[-6]+R[42]C[-3]+R[42]C+R[42]C[3]+R[42]C[6]+R[42]C[9]+R[42]C[12]+R[42]C[15]+R[42]C[18]+R[42]C[21]+R[42]C[24]+R[42]C[27]+R[42]C[30]+R[42]C[33]+R[42]C[36]+R[42]C[39]+R[49]C[-6]+R[49]C[-3]+R[49]C+R[49]C[3]+R[49]C[6]+R[49]C[9]+R[49]C[12]+R[49]C[15]+R[49]C[18]+R[49]C[21]+R[49]C[24]+R[49]C[27]+R[49]C[30]+R[49]C[33]+R[49]C[36]+R[49]C[39]+R[56]C[-6]+R[56]C[-3]+R[56]C+R[56]C[3]+R[56]C[6]+R[56]C[9]+R[56]C[12]+R[56]C[15]+R[56]C[18]+R[56]C[21]+R[56]C[24]+R[56]C[27]+R[56]C[30]+R[56]C[33]+R[56]C[36]+R[56]C[39])"
[K64].FormulaR1C1 = "=SUM(R[-47]C[-6]+R[-47]C[-3]+R[-47]C+R[-47]C[3]+R[-47]C[6]+R[-47]C[9]+R[-47]C[12]+R[-47]C[15]+R[-47]C[18]+R[-47]C[21]+R[-47]C[24]+R[-47]C[27]+R[-47]C[30]+R[-47]C[33]+R[-47]C[36]+R[-47]C[39]+R[-37]C[-6]+R[-37]C[-3]+R[-37]C+R[-37]C[3]+R[-37]C[6]+R[-37]C[9]+R[-37]C[12]+R[-37]C[15]+R[-37]C[18]+R[-37]C[21]+R[-37]C[24]+R[-37]C[27]+R[-37]C[30]+R[-37]C[33]+R[-37]C[36]+R[-37]C[39]+R[-26]C[-6]+R[-26]C[-3]+R[-26]C+R[-26]C[3]+R[-26]C[6]+R[-26]C[9]+R[-26]C[12]+R[-26]C[15]+R[-26]C[18]+R[-26]C[21]+R[-26]C[24]+R[-26]C[27]+R[-26]C[30]+R[-26]C[33]+R[-26]C[36]+R[-26]C[39]+R[-15]C[-6]+R[-15]C[-3]+R[-15]C+R[-15]C[3]+R[-15]C[6]+R[-15]C[9]+R[-15]C[12]+R[-15]C[15]+R[-15]C[18]+R[-15]C[21]+R[-15]C[24]+R[-15]C[27]+R[-15]C[30]+R[-15]C[33]+R[-15]C[36]+R[-15]C[39]+R[-4]C[-6]+R[-4]C[-3]+R[-4]C+R[-4]C[3]+R[-4]C[6]+R[-4]C[9]+R[-4]C[12]+R[-4]C[15]+R[-4]C[18]+R[-4]C[21]+R[-4]C[24]+R[-4]C[27]+R[-4]C[30]+R[-4]C[33]+R[-4]C[36]+R[-4]C[39]+R[3]C[-6]+R[3]C[-3]+R[3]C[3])"
R[3]C[6]+R[3]C[9]+R[3]C[12]+R[3]C[15]+R[3]C[18]+R[3]C[21]+R[3]C[24]+R[3]C[27]+R[3]C[30]+R[3]C[33]+R[3]C[36]+R[3]C[39]+R[9]C[-6]+R[9]C[-3]+R[9]C[3]+R[9]C[6]+R[9]C[9]+R[9]C[12]+R[9]C[15]+R[9]C[18]+R[9]C[21]+R[9]C[24]+R[9]C[27]+R[9]C[30]+R[9]C[33]+R[9]C[36]+R[9]C[39]+R[15]C[-6]+R[15]C[-3]+R[15]C[3]+R[15]C[6]+R[15]C[9]+R[15]C[12]+R[15]C[15]+R[15]C[18]+R[15]C[21])"
R[15]C[24]+R[15]C[27]+R[15]C[30]+R[15]C[33]+R[15]C[36]+R[15]C[39]+R[22]C[-6]+R[22]C[-3]+R[22]C+R[22]C[3]+R[22]C[6]+R[22]C[9]+R[22]C[12]+R[22]C[15]+R[22]C[18]+R[22]C[21]+R[22]C[24]+R[22]C[27]+R[22]C[30]+R[22]C[33]+R[22]C[36]+R[22]C[39]+R[29]C[-6]+R[29]C[-3]+R[29]C+R[29]C[3]+R[29]C[6]+R[29]C[9]+R[29]C[12]+R[29]C[15]+R[29]C[18]+R[29]C[21]+R[29]C[24]+R[29]C[27]+R[29]C[30]+R[29]C[33]+R[29]C[36]+R[29]C[39]+R[36]C[-6]+R[36]C[-3]+R[36]C+R[36]C[3]+R[36]C[6]+R[36]C[9]+R[36]C[12]+R[36]C[15]+R[36]C[18]+R[36]C[21]+R[36]C[24]+R[36]C[27]+R[36]C[30]+R[36]C[33]+R[36]C[36]+R[36]C[39]+R[44]C[-6]+R[44]C[-3]+R[44]C+R[44]C[3]+R[44]C[6]+R[44]C[9]+R[44]C[12]+R[44]C[15]+R[44]C[18]+R[44]C[21]+R[44]C[24]+R[44]C[27]+R[44]C[30]+R[44]C[33]+R[44]C[36]+R[44]C[39]+R[51]C[-6]+R[51]C[-3]+R[51]C+R[51]C[3]+R[51]C[6]+R[51]C[9]+R[51]C[12]+R[51]C[15]+R[51]C[18]+R[51]C[21]+R[51]C[24]+R[51]C[27]+R[51]C[30]+R[51]C[33]+R[51]C[36])"
R[51]C[39]+R[58]C[-6]+R[58]C[-3]+R[58]C+R[58]C[3]+R[58]C[6]+R[58]C[9]+R[58]C[12]+R[58]C[15]+R[58]C[18]+R[58]C[21]+R[58]C[24]+R[58]C[27]+R[58]C[30]+R[58]C[33]+R[58]C[36]+R[58]C[39])"
[B65] = "SEGUNDA"

Agradeço a todos

Àlex

Autor: Alex Sander Assumpção
Data de inclusão: 30/06/2011
Último acesso: 10/11/2018
Downloads: 679
Avaliação média: Nota 5
5 de 5
(baseado em 3 votos)

Envie sua avaliação!

O que você achou deste script?
Ajude a comunidade enviando sua nota. Sua opinião é muito importante!

1 2 3 4 5
1

TOP códigos em Vários (VB Script)

Código Downloads
VBScript 26.702
Script para colher Eventos do Event Viewer!!! 19.070
Verificar o último dia útil do mês 18.508
NOTÍCIAS ATUALIZADAS E PERSONALIZADAS! 17.378
Alert 16.348