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.

Como saber si hay internet

publicado

Hola, estoy haciendo una macro donde tengo un formulario y lo mando a Google Sheets.

Como puedo pregunta si hay internet para que me la marque de Enviada y si no que la suba cuando si halla internet.

 

Featured Replies

publicado
Hace 4 horas, Janlui dijo:

Hola, estoy haciendo una macro donde tengo un formulario y lo mando a Google Sheets.

Como puedo pregunta si hay internet para que me la marque de Enviada y si no que la suba cuando si halla internet.

 

@Janlui en un aporte de @Cacho R en el foro hermano hay un aporte en el que se evalúa si hay conexión a una pagina web, no sé si te podrá servir de algo:

Function VerificaURL() As Boolean
With CreateObject("Microsoft.XMLHttp")
  .Open "Get", "https://www.google.com.ar", False
  On Error Resume Next: .Send: On Error GoTo 0
  VerificaURL = .readyState = 4 And .Status = 200
End With
End Function

https://foro.todoexcel.com/threads/ejecutar-macro-solo-cuando-haya-conexión-a-internet.43403/

Por último te comparto el aporte de @Héctor Miguel en el mismo post.

Private Declare Function EstadoConexionInternet Lib "wininet" _
  Alias "InternetGetConnectedState" (ByRef opciones As Long, _
    ByVal reservado As Long) As Long
Private Function InternetConectado() As Boolean
  Dim opciones As Long
  EstadoConexionInternet opciones, 0&
  InternetConectado = opciones And (&H1 Or &H2 Or &H4)
End Function

 

Editado el por Jose BN

publicado
  • Autor

Muchas gracias.

Pondré a prueba y espero sean de utilidad.

Muchas gracias.

 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

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.