Boa Noite Pessoal,
Fiz um botão limpar aonde eu abro as colunas e linhas ocultas para voltar as formulas, logo apos deveria ocultar e finalizar o processo.
Mas estou tendo um problema... no final ele minimiza todas as minha colunas.
alguem poderia me ajudar
Sub limpar()
'
' limpar Macro
'
'
Columns("C:F").Select
Range("F1").Activate
Selection.EntireColumn.Hidden = False
ActiveWindow.SmallScroll Down:=12
Rows("34:36").Select
Range("A36").Activate
Selection.EntireRow.Hidden = False
Range("A35:I35").Select
Selection.AutoFill Destination:=Range("A15:I35"), Type:=xlFillDefault
Range("A15:I35").Select
ActiveWindow.SmallScroll Down:=-18
Range("F6:G6").Select
ActiveCell.FormulaR1C1 = _
"=IF(ISERROR(IF(R6C2=0,"""",VLOOKUP(R6C2,Distribuidores!R[-5]:R[1048570],2,0)))=TRUE,0,IF(R6C2=0,"""",VLOOKUP(R6C2,Distribuidores!R[-5]:R[1048570],2,0)))"
Range("B6").Select
Selection.ClearContents
Range("A35:I35").Select
Selection.AutoFill Destination:=Range("A15:I35"), Type:=xlFillDefault
Range("A15:I35").Select
ActiveWindow.SmallScroll Down:=18
Range("D39:D46").Select
Selection.Copy
Range("B39").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C39:C60").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("B49").Select
Selection.ClearContents
Range("B57:B61").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=15
Range("B63:B68").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-9
Range("D50:D54").Select
Selection.Copy
Range("B50").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-57
Columns("D:E").Select
Range("E1").Activate
Selection.EntireColumn.Hidden = True
ActiveWindow.SmallScroll Down:=21
Rows("35:35").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SmallScroll Down:=-30
Range("A1").Select
End Sub
Postado : 02/06/2013 6:46 pm