I'm a beginner with Vba.
I tryed to hide cell Gridlines on my Workbook with the last insruction of the following sub, the problema is that my workbook is composed from two worksheets, and Gridlines were only hide for one of them (the first):
Sub Valores()
Set NewBook = Workbooks.Add
szToday = Format(Date - 1, "YYYYMMDD")
With NewBook
.Title = "Control_Colaterales"
.Subject = "Control Colaterales"
.SaveAs Filename:="V:\Departamento\7920-SOLVENCIA\1. Riesgo de Mercado\2. RIESGO DE CONTRAPARTIDA\1. REPORTING DIARIO R.Contrapartida\1. Enviados\Colaterales\Informe_Control_Colaterales_" & szToday & ".xls"
End With
ThisWorkbook.Worksheets(1).Activate
Cells.Select
Selection.Copy
NewBook.Sheets(1).Activate
ActiveSheet.Name = "CSA y REPO Retrospectivo"
ActiveSheet.Paste
ActiveSheet.Cells.Select
Selection.Copy
ActiveSheet.Range("A1").PasteSpecial xlPasteValues
Worksheets.Add(After:=Sheets(Worksheets.Count)).Name = "CSA y REPO Actual"
ThisWorkbook.Worksheets(1).Activate
Nows = "CSA y REPO Actual"
Worksheets(Nows).Activate
ActiveSheet.Cells.Select
Selection.Copy
NewBook.Sheets(2).Activate
ActiveSheet.Paste
ActiveSheet.Cells.Select
Selection.Copy
ActiveSheet.Range("A1").PasteSpecial xlPasteValues
NewBook.Sheets(1).Activate
ActiveSheet.Range("A1").Activate
ActiveWorkbook.Windows(1).DisplayGridlines = False
End Sub
¿Could anyone help me?
Thank you very much