Está en la página 1de 7

No olvides seguirnos en:

Facebook – Youtube y nuestro Blog

Síguenos dando clic en los siguientes enlaces.

Facebook

Blog excelavanzadoymsa

Youtube

Sabemos lo que es dar vueltas y vueltas en la WEB buscando una respuesta a


nuestras inquietudes y al final no encontramos lo que estábamos buscando, pues
déjame decirte que has llegado al lugar indicado donde sí te damos respuestas a
todas tus inquietudes y además puedes aprender muchas cosas que no creías
que se podían hacer con las macros, y lo más importante que es gratuito,
suscríbete y recibe todos los archivos y video tutoriales en tu bandeja de entrada
semana a semana.

¡BIENVENIDO QUERIDO SEGUIDOR DE EXCEL


AVANZADO Y MACROS SUPERAVANZADAS AL
MEJOR Y MAS INNOVADOR LUGAR DE LA WEB
DE EXCEL AVANZADO Y MACROS DE ALTO
NIVEL!
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

Código VBA para abrir redes sociales y páginas


automáticamente

'ABRIR FACEBOOK.......................................................................................
Private Sub CommandButton1_Click()
Dim url As String ' Se define la variable url como texto

url = "https://www.facebook.com" ' se asigna la página a abrir

ActiveWorkbook.FollowHyperlink url

Application.WindowState = xlMaximized
bClick = True

Application.Wait Now + TimeValue("00:00:06") ' Aquí se personaliza el tiempo de


espera, con 1 no funciona.

SendKeys "NOMBRE DE USUARIO", True ' Aquí pones tu nombre de usuario


Application.Wait 1000
SendKeys "{TAB}", True ' Presiona la tecla "TAB" para desplazarse a la siguiente
casilla
SendKeys "CONTRASEÑA", True ' Aquí pones la clave de acceso a la cuenta
Application.Wait 1000
SendKeys "~", True ' Activa y presiona la tecla INTRO o Enter
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

SendKeys "{NUMLOCK}", True


End Sub

'ABRIR YAHOO............................................................................................
Private Sub CommandButton2_Click()
Dim url As String ' Se define la variable url como texto

url = "https://login.yahoo.com/config/login?.intl=co&.lang=es-
CO&.partner=&.last=&.src=ym&.pd=ym_ver%3D0%26c%3D%26ivt%3D%26sg%3
D&pkg=&stepid=&.done=http%3a//mail.yahoo.com" ' se asigna la página a abrir

ActiveWorkbook.FollowHyperlink url

Application.WindowState = xlMaximized
bClick = True

Application.Wait Now + TimeValue("00:00:06") ' Aquí se personaliza el tiempo de


espera,con 1 no funciona.

SendKeys " NOMBRE DE USUARIO ", True ' Aquí pones tu nombre de usuario
Application.Wait 1000
SendKeys "{TAB}", True ' Presiona la tecla "TAB" para desplazarse a la siguiente
casilla
SendKeys "CONTRASEÑA", True ' Aquí pones la clave de acceso a la cuenta
Application.Wait 1000
SendKeys "~", True ' Activa y presiona la tecla INTRO o Enter
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

SendKeys "{NUMLOCK}", True


End Sub

'ABRIR TWITTER...........................................................................................

Private Sub CommandButton3_Click()


Dim url As String ' Se define la variable url como texto

url = "https://twitter.com/login" ' se asigna la página a abrir

ActiveWorkbook.FollowHyperlink url

Application.WindowState = xlMaximized
bClick = True

Application.Wait Now + TimeValue("00:00:06") ' Aquí se personaliza el tiempo de


espera, el mínimo que acepta es 2 segundos, con 1 no funciona.

SendKeys " NOMBRE DE USUARIO ", True ' Aquí pones tu nombre de usuario
Application.Wait 1000
SendKeys "{TAB}", True ' Presiona la tecla "TAB" para desplazarse a la siguiente
casilla

SendKeys "CONTRASEÑA", True ' Aquí pones la clave de acceso a la cuenta


Application.Wait 1000
SendKeys "~", True ' Activa y presiona la tecla INTRO o Enter
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

SendKeys "{NUMLOCK}", True


End Sub

'ABRIR GMAIL...........................................................................................

Private Sub CommandButton4_Click()


Dim url As String ' Se define la variable url como texto

url =
"https://accounts.google.com/ServiceLogin?sacu=1&continue=https%3A%2F%2F
mail.google.com%2Fmail%2F&hl=es-419" ' se asigna la página a abrir

ActiveWorkbook.FollowHyperlink url

Application.WindowState = xlMaximized
bClick = True

Application.Wait Now + TimeValue("00:00:06") ' Aquí se personaliza el tiempo de


espera, el mínimo que acepta es 2 segundos, con 1 no funciona.

SendKeys " NOMBRE DE USUARIO ", True ' Aquí pones tu nombre de usuario
Application.Wait 1000
SendKeys "{TAB}", True ' Presiona la tecla "TAB" para desplazarse a la siguiente
casilla
SendKeys "CONTRASEÑA", True ' Aquí pones la clave de acceso a la cuenta
Application.Wait 1000
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

SendKeys "~", True ' Activa y presiona la tecla INTRO o Enter

SendKeys "{NUMLOCK}", True


End Sub

'ABRIR YOUTUBE...........................................................................................

Private Sub CommandButton5_Click()


Dim url As String ' Se define la variable url como texto

url =
"https://accounts.google.com/ServiceLogin?sacu=1&continue=http%3A%2F%2Fw
ww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop
%26feature%3Dsign_in_button%26hl%3Des-419%26next%3D%252F&hl=es-
419&service=youtube" ' se asigna la página a abrir

ActiveWorkbook.FollowHyperlink url

Application.WindowState = xlMaximized
bClick = True

Application.Wait Now + TimeValue("00:00:06") ' Aquí se personaliza el tiempo de


espera, el mínimo que acepta es 2 segundos, con 1 no funciona.

SendKeys " NOMBRE DE USUARIO ", True ' Aquí pones tu nombre de usuario
Application.Wait 1000
SendKeys "{TAB}", True ' Presiona la tecla "TAB" para desplazarse a la siguiente
casilla
No olvides seguirnos en:
Facebook – Youtube y nuestro Blog

SendKeys "CONTRASEÑA", True ' Aquí pones la clave de acceso a la cuenta


Application.Wait 1000
SendKeys "~", True ' Activa y presiona la tecla INTRO o Enter

SendKeys "{NUMLOCK}", True


End Sub

También podría gustarte