This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) | |
TextBox1.Text = UCase(TextBox1.Text) | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton1_Click() | |
With Selection | |
. Font.Size = Val(10) | |
. ParagraphFormat.LineSpacingRule = wdLineSpaceSingle | |
. TypeParagraph | |
. Font.Name = “arial black” | |
. ParagraphFormat.Alignment = wdAlignParagraphCenter | |
. TypeText Text:=vbTab & “Programa de Prueba” | |
. ParagraphFormat.Alignment = wdAlignParagraphLeft | |
. TypeParagraph |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Curso VBA-8Sub Macro2() | |
‘ | |
‘ Macro2 Macro | |
‘ Macro grabada el 24-12-98 por TOMAS BRADANOVIC | |
‘ | |
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then | |
ActiveWindow.Panes(2).Close | |
End If | |
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.PrintOut FileName:=”Permiso.doc”, Range:=wdPrintCurrentPage, Item:= _ | |
wdPrintDocumentContent, Copies:=1, Pages:=”", PageType:=wdPrintAllPages, _ | |
Collate:=True, Background:=True, PrintToFile:=False | |
Selection.WholeStory | |
Selection.Delete Unit:=wdCharacter, Count:=1 | |
Unload UserForm1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub formulario1() | |
‘ | |
‘ formulario1 Macro | |
‘ Macro creada el 26/07/2010 por INTEL | |
‘ | |
UserForm1.show | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
‘ Programa para llenar automáticamente un formulario en word | |
‘ Lo que está escrito con comilla simple son solo comentarios para explicar el programas, pueden omitirse | |
‘ With… EndWith sirve para no tener que repetir la misma instrucción en cada línea, en este caso Selection | |
‘ | |
With Selection | |
.ParagraphFormat.LineSpacingRule = wdLineSpaceSingle ‘Coloca espacio de líneas en “espacio simple” | |
.TypeParagraph ‘Pasa a linea siguiente | |
.TypeParagraph ‘Pasa a linea siguiente | |
.Font.Bold = True ‘Coloca negrita | |
.TypeParagraph ‘Pasa a linea siguiente |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton1_Click() | |
indice = Hoja1.Cells(1, 1) | |
If indice = "" Then | |
indice = 1 | |
Hoja1.Cells(1, 1) = indice | |
End If | |
indice = indice + 1 | |
Hoja1.Cells(1, 1) = indice | |
Hoja1.Cells(indice, 1) = TextBox1.Text | |
Hoja1.Cells(indice, 2) = TextBox2.Text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub ComboNombre_Exit(ByVal Cancel As MSForms.ReturnBoolean) | |
Rem al escoger un item del combobox hace lo siguiente | |
Rem coloca el costo en textbox1 | |
TextBox1.Text = Hoja1.Cells(2, 2) | |
Rem coloca el precio de venta (lista) en textbox2 | |
TextBox2.Text = Hoja1.Cells(2, 3) | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton1_Click() | |
Rem para agregar un nuevo articulo | |
Rem se carga userform2 | |
Load UserForm2 | |
Rem se muestra userforrm2 | |
UserForm2.Show | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton2_Click() | |
Rem al ingresar la venta | |
Rem el saldo esta en hoja1.cells de la linea de combo que elegimos | |
Rem que en la hoja exel seria la posicion combonombre.listindex + 1 | |
Rem recordar el formato Hoja1.Cells(linea,columna) | |
Rem luego toma el valor (cantidad) almacenado en esa celda y le resta el valor de textbox3.text | |
Hoja1.Cells(ComboNombre.ListIndex + 1, 2) = Hoja1.Cells(ComboNombre.ListIndex + 1, 2) - TextBox3.Text | |
Rem con eso deja la cantidad rebajada | |
Rem luego limpia los textbox combo y pone el foco en combonombre | |
TextBox1.Text = "" |