Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hola compañeros,

Quiero compartir con todos vosotros la barra de progreso que personalmente utilizo en mis aplicaciones ofimáticas.

Antes de nada, me gustaría apuntar que sólo recomiendo utilizar dicha barra de progreso en aquellos procedimientos en los que se haga un recorrido por todas las celdas de la hoja, tal y como puede comprobarse en el fichero adjunto.

Sin más que añadir, este es el código:

Sub BarraDeProgreso()

Application.ScreenUpdating = False

   ' Limpiamos los errores anteriores (por si acaso)...
   Err.Clear

   ' Tratamos los errores del procedimiento...
   On Error Resume Next

   ' Declaramos las constantes y variables locales...
   Const LONGITUD As Byte = 25
   Dim contador As Byte

   ' Recorremos el bucle...
   For contador = 1 To LONGITUD
      ' Iniciamos la barra de progreso...
      Application.StatusBar = Application.Rept(ChrW(9607), contador) & "  " & _
                              Application.Rept("  ", LONGITUD - contador) & Int(contador * 100 / LONGITUD) & "% completado" & _
                              IIf(contador <> LONGITUD, "...", ".")
      ' E insertamos aquí el procedimiento...
      ' ...
   Next contador

   ' Esperamos unos segundos...
   Call Application.Wait(Now + TimeValue("0:00:03"))

   ' Y finalizamos la barra de progreso...
   Application.StatusBar = False

'End Sub

Espero que os sea de utilidad.

Gracias, y un saludo.

 

Editado el por paikerr

Comentarios de los usuarios

Create an account or sign in to leave a review

No hay nuevas revisiones para visualizar.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.