Amigos,
Tenho uma planilha que funcionava bem com algumas macros simples no excel 2010.
Quando migrei para o excel 2013 todas pararam de funcionar. O que pode ter ocorrido?
Seguem os três códigos que eram utilizados:
1) Auto filtro
Private Sub TextBox1_Change()
If TextBox1.Text <> "" Then
Selection.AutoFilter Field:=1, Criteria1:="=" & TextBox1.Text
Else
Selection.AutoFilter Field:=1
End If
End Sub
2) Marcar célula com duplo click
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Selection.Font.Name = "Webdings" Then
Cancel = True
If Target = vbNullString Then
Target = "a"
Else
Target = vbNullString
End If
Exit Sub
End If
End Sub
3) Salvar dados de Formulário
Sub SALVAR()
'
' SALVAR Macro
'
Application.ScreenUpdating = False
'
Sheets("DADOS").Select
Rows("5:7").Select
Selection.EntireRow.Hidden = False
Range("A6:I6").Select
Selection.Copy
Range("A7:I7").Select
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J6:AL6").Select
Application.CutCopyMode = False
Selection.Copy
Range("J7:AL7").Select
Range("AL7").Activate
Selection.Insert Shift:=xlDown
Rows("6:6").Select
Selection.EntireRow.Hidden = True
Sheets("CRONOGRAMA").Select
Rows("5:7").Select
Selection.EntireRow.Hidden = False
Range("A6:D6").Select
Application.CutCopyMode = False
Selection.Copy
Range("A7:D7").Select
Range("D7").Activate
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E6:BB6").Select
Application.CutCopyMode = False
Selection.Copy
Range("E7:BB7").Select
Range("BB7").Activate
Selection.Insert Shift:=xlDown
ActiveWindow.ScrollColumn = 1
Rows("6:6").Select
Selection.EntireRow.Hidden = True
Sheets("FORMULARIO").Select
Range("I8").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("I10:O10").ClearContents
Range("I12:L12").ClearContents
Range("O12").ClearContents
Range("I14:J14").ClearContents
Range("I16:J16").ClearContents
Range("M14").ClearContents
Range("M16").ClearContents
Range("I8").Select
Application.ScreenUpdating = True
End Sub
Postado : 07/04/2015 12:43 pm