Glosario visual basic
Range("A1").Select
Escribir en una Celda
Activecell.FormulaR1C1="Ramon"
Letra Negrita
Selection.Font.Bold = True
Letra Cursiva
Selection.Font.Italic = True
LetraSubrayada
Selection.Font.Underline = xlUnderlineStyleSingle
Centrar Texto
With Selection
.HorizontalAlignment = xlCenter
End With
Alinear a la izquierda
With Selection.HorizontalAlignment = xlLeft
End With
Alinear a la Derecha
With Selection
.HorizontalAlignment = xlRight
End With
Tipo de Letra(Fuente)
With Selection.Font
.Name ="AGaramond"
End With
Tamaño de Letra(Tamaño de Fuente)
With Selection.Font
.Size = 15
End With
Copiar
Selection.Copy
Pegar
ActiveSheet.Paste
Cortar
Selection.Cut
OrdenarAscendente
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Orden Descendente
Selection.SortKey1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Buscar
Cells.Find(What:="Ramon", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart,SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Insertar Fila
Selection.EntireRow.Insert
Eliminar Fila
Selection.EntireRow.Delete
Insertar ColumnaSelection.EntireColumn.Insert
Eliminar Columna
Selection.EntireColumn.Delete
Abrir un Libro
Workbooks.Open Filename:="C:\Mis documentos\video safe 3.xls"
Grabar un Libro
ActiveWorkbook.SaveAs Filename:="C:\Misdocumentos\piscis.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Evitar que al ejecutar una macro nos haga preguntas
Alprincipio de la macro escribe
Application.DisplayAlerts= False
y al final
Application.DisplayAlerts=True
Evitar que al ejecutar una macro nos haga preguntas
Al principio de la macro...
Regístrate para leer el documento completo.