Hola, ni nombre es Gonzalo
Estoy recién entrando al mundo de las macros
Necesito que me puedan oprientar con lo siguiente
Tengo los siguientes datos en una macro
Sub AjustarTablaInforme(
Range("A4").Selec
Selection.AutoFilte
Selection.AutoFilter Field:=1, Criteria1:="<>
ActiveWindow.SelectedSheets.PrintPrevie
End Su
Sub AjustarTablaInfMensual(
Range("A1").Selec
Selection.AutoFilte
Selection.AutoFilter Field:=1, Criteria1:="<>
ActiveWindow.SelectedSheets.PrintPrevie
End Su
Sub MostrarDataForm(
Hoja2.Selec
Range("N1:AA31").Selec
ActiveSheet.ShowDataFor
End Su
Sub CreateMenu(
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarContro
RemoveMenu ' delete the menu if it already exist
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , , True
With cbMen
.Caption = "&Remuneraciones
.Tag = "MyTag
.BeginGroup = Fals
End Wit
If cbMenu Is Nothing Then Exit Sub ' didn't find the menu..
With cbMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "&Información de los Empleados
.OnAction = "Empleados
.Style = msoButtonIconAndCaptio
.FaceId = 60
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "I&nformación Mensual
.OnAction = "InfoMensual
.Style = msoButtonIconAndCaptio
.FaceId = 46
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "&Tabla de AFP's
.OnAction = "CotAFP
.Style = msoButtonIconAndCaptio
.FaceId = 85
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "T&abla de ISAPRES
.OnAction = "ISAPRES
.Style = msoButtonIconAndCaptio
.FaceId = 85
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "In&formación de la Empresa
.OnAction = "InfoEmpresa
.Style = msoButtonIconAndCaptio
.FaceId = 101
.State = msoButtonUp ' or msoButtonDow
End Wit
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True
With cbSubMen
.Caption = "Im&primir
.Tag = "SubMenu1
.BeginGroup = Tru
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "Informe &Resumen
.OnAction = "InfoResumen
.Style = msoButtonIconAndCaptio
.FaceId =
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "&Liquidaciones de Sueldo
.OnAction = "LiqSueldos
.Style = msoButtonIconAndCaptio
.FaceId = 197
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "&Planilla de Remuneraciones
.OnAction = "PlanillaRemu
.Style = msoButtonIconAndCaptio
.FaceId =
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "&Cotizaciones AFP's e ISAPRES
.OnAction = "ImprimirAFPISAPRE
.Style = msoButtonIconAndCaptio
.FaceId = 85
.State = msoButtonUp ' or msoButtonDow
End Wit
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True
With cbSubMen
.Caption = "Base de Datos
.Tag = "SubMenu2
.BeginGroup = Tru
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "Grabar Datos del Mes
.OnAction = "GrabarDatos
.Style = msoButtonIconAndCaptio
.FaceId = 190
.State = msoButtonUp ' or msoButtonDow
End Wit
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True
.Caption = "Recuperar Datos"
.OnAction = "RecuperarDatos"
.Style = msoButtonIconAndCaption
.FaceId = 1900
.State = msoButtonUp ' or msoButtonDown
End With
Set cbSubMenu = Nothing
Set cbMenu = Nothing
End Sub
Sub RemoveMenu()
DeleteCustomCommandBarControl "MyTag" ' deletes the new menu
End Sub
Private Sub DeleteCustomCommandBarControl(CustomControlTag As String)
On Error Resume Next
Do
Application.CommandBars.FindControl(, , CustomControlTag, False).Delete
Loop Until Application.CommandBars.FindControl(, , CustomControlTag, False) Is Nothing
On Error GoTo 0
End Sub
Sub ShowHideMenu(MenuVisible As Boolean)
ChangeControlVisibility "MyTag", MenuVisible ' toggles menu visibility
End Sub
Private Sub ChangeControlVisibility(CustomControlTag As String, MenuVisible As Boolean)
On Error Resume Next
Application.CommandBars.FindControl(, , CustomControlTag, False).Visible = MenuVisible
On Error GoTo 0
End Sub
Sub Empleados()
UserForm1.Show
End Sub
Sub InfoResumen()
Application.ScreenUpdating = False
SelAFP
Sheets("Informe").Select
AjustarTablaInforme
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub LiqSueldos()
SelAFP
ImprimirLiqSueldo
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub InfoMensual()
Application.ScreenUpdating = False
Hoja2.Select
ActiveSheet.ShowDataForm
SelAFP
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub CotAFP()
Application.ScreenUpdating = False
Sheets("AFP").Select
ActiveSheet.ShowDataForm
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub PlanillaRemu()
SelAFP
ImprimirPlanRemu
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub ImprimirAFPISAPRE()
SelAFP
ImprimirISAPRE
ImprimirAFP
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub InfoEmpresa()
Application.ScreenUpdating = False
Sheets("Datos Empresa").Select
ActiveSheet.ShowDataForm
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Sub ISAPRES()
Application.ScreenUpdating = False
Sheets("ISAPRE").Select
ActiveSheet.ShowDataForm
Sheets("Sueldos").Select
Range("G19").Select
End Sub
Todos los datos me funcionan bien con esta planilla.
Con esto se me activa este menú
Forms.CommandButton.1";""
Lo que necesito es que cambiar los colores de los botones, de las etiquetas, del texto de las etiquetas, del fondo y del scrollbar por otros que no sean los del sistema.
Agradeciendo desde ya la ayuda.
Atentamente:
Gonzalo
Zaito
Ver este tema:
http://www.softwaremix.net/viewtopic-518946.html
Enviado desde
http://www.softwaremix.net
Leer las respuestas