You are on page 1of 1

CREAR UN LIBRO NUEVO

Workbooks.Add

Sub AddNew()
Set NewBook = Workbooks.Add
With NewBook
.Title = "All Sales"
.Subject = "Sales"
.SaveAs Filename:="Allsales.xls"
End With
End Sub

ABRIR UN LIBRO
Workbooks.Open("C:\MyFolder\MyBook.xls")

GUARDAR DOCUMENTO COMO PAGINA WEB


ActiveWorkbook.SaveAs _
Filename:="C:\Reports\myfile.htm", _
FileFormat:=xlHTML

With Application.DefaultWebOptions
.RelyonVML = True
.AllowPNG = True
.PixelsPerInch = 96
End With
With ActiveWorkbook
.WebOptions.AllowPNG = False
With .PublishObjects(1)
.FileName = "C:\Reports\1998_Q1.htm"
.Publish
End With
End With

RESALTAR LA FILA ACTIVA


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
' Clear the color of all the cells
Cells.Interior.ColorIndex = 0
' Highlight the active cell
Target.Interior.ColorIndex = 8
Application.ScreenUpdating = True
End Sub

You might also like