Hola amigos
Adjunto un archivo de uso diario en el cual me funciona bien una macro de limpieza de rangos específicos.
Quiero estar seguro que si abro otro archivo no se ejecute en éste recién abierto la misma macro si presiono (por equivocación) las teclas de acceso directo. En este caso Ctrl+Mayus+V.
Lo hice con grabación de macros y al código generado yo le agregué "With Hoja1" y su correspondiente "End With".
¿Debo en alguna parte del código (supongo que al principio) agregar algo más? Algo como "ThisWorkbook" u otra propiedad...
Gracias de antemano
Rubén
000000 Transferencias.xlsm
Por
RubenDario, · publicado
hola que tal no se como poder poner un listbox con barra de dezplamiento horizontal
¿alguna sugerencia?
este es mi codigo que no funciona
Private Sub Lst_nombres_Click()
Call DisplayHScroll
End Sub
Private Sub DisplayHScroll()
' Make no partial items are displayed vertically.
Me.Lst_nombres.IntegralHeight = True
Dim x As Integer
' Add items that are wide to the ListBox.
For x = 0 To 10
Me.Lst_nombres.Items.Add ("Item " + x.ToString() + " is a very large value that requires scroll bars")
Next x
' Display a horizontal scroll bar.
Me.Lst_nombres.HorizontalScrollbar = True
' Create a Graphics object to use when determining the size of the largest item in the ListBox.
Dim g As System.Drawing.Graphics
g = Lst_nombres.CreateGraphics()
' Determine the size for HorizontalExtent using the MeasureString method using the last item in the list.
Dim hzSize As Integer
g.MeasureString(lst_nombre.Items(Lst_nombres.Items.Count - 1).ToString(), Lst_nombres.Font).Width
' Set the HorizontalExtent property.
Me.Lst_nombres.HorizontalExtent = hzSize
End Sub