Saltar al contenido
PROGRAMAR EN VBA MACROS DE EXCEL

Hyperlink o hipervinculo a Google Maps


(adsbygoogle = window.adsbygoogle || []).push({});

En en el post anterior se mostró como crear un hiperlink o hipervínculo y que al hacer click ejecute el programa predeterminado para mandar un correo electrónico o mail,  en esta oportunidad voy a mostrar como realizar un hyperlink o hipervinculo a Google Maps; el tema de como insertar un hyperlink en Excel ha sido tratado en varias oportunidades en esta web, no obstante ello y a pesar de ser similar, agregó este ejemplo que permite insertar un hipervínculo o hyperlink a google maps.


Antes de seguir recomiendo leer un excelente libro sobre Excel que te ayudará operar las planillas u hojas de cálculo, haz click acá, si quieres aprender sobre Excel, en inglés, entonces debes hacer click here. Si lo que necesitas es aprender o profundizar sobre la programación de macros con VBA este es unos de los mejores cursos on line que he visto en internet.

  

Desde el link del final podrás  bajar el archivo de ejemplo y adaptarlo a tus necesidades, el código es libre y no tiene ningún tipo de restricción.

MASTERCARD PAYONEER

Al descargar el ejemplo de macro o código de VBA, verás que existe un botón insertado que permite llamar un formulario, este formulario contiene tres textbox uno para nombre, otro para dirección y otro para mail; para convertirá en un hyperlink o hipervínculo de correo electrónico, es decir abrirá el programa predeterminado para el envío de mails, que por lo general es Outlook.

En el segundo textbox se crea un hyperlink o hipervinculo a Google Maps, la ventaja es que al presionar directamente busca en Google Maps el valor del textbox 2.

El formulario tiene dos botones uno para cancelar y cerrar el formulario y el otro que permite guardar en la celda el dato introducido en el textbox, la macro sola determina la última fila con datos o primer fila libre para pegar el dato del textbox; el ejemplo lo puedes descargar sin restricción desde el link del final de este post, el código que se incorpora a continuación es el que encontrarás en el ejemplo, si lo observas tiene una codificación que se deber insertar en un módulo, esto es a los fines de llamar el formulario, el resto de la codificación que se inserta en un userform es el que permite crear el hyperlink o hipervínculo.

El vídeo que sigue muestra una explicación más detallada y gráfica de la macro presentada, recomiendo observar para una más fácil comprensión de la macro; suscribe a nuestra web desde la parte superior derecha de la página ingresando tu mail y a nuestro canal de You Tube para recibir en tu correo vídeos explicativos sobre macros interesantes, como  por ejemplo formulario que crea un listado de todas las hojas para poder luego seleccionarlasbuscar en listbox mientras escribes en textboxordenar hojas libro excel por su nombreconectar Excel con Access y muchos ejemplos más.

function onYtEvent(payload) {
if (payload.eventType == ‘subscribe’) {
// Add code to handle subscribe event.
} else if (payload.eventType == ‘unsubscribe’) {
// Add code to handle unsubscribe event.
}
if (window.console) { // for debugging only
window.console.log(‘YT event: ‘, payload);
}
}

Código que se inserta en un módulo

Sub mostrar()
UserForm1.Show

End Sub

Código que se inserta en un userform
Private Sub CommandButton1_Click()
Dim uf As Integer
Dim m, dt, d1, dt1 As String
uf = Sheets(«hoja1»).Range(«A» & Rows.Count).End(xlUp).Row
Sheets(«hoja1»).Cells(uf + 1, 1) = TextBox1
Sheets(«hoja1»).Cells(uf + 1, 2) = TextBox2
d1 = «https://maps.google.es/maps?q=» & TextBox2
dt1 = TextBox2
Sheets(«hoja1»).Hyperlinks.Add Anchor:=Sheets(«hoja1»).Cells(uf + 1, 2), Address:=d1, TextToDisplay:=dt1

m = «mailto:» & TextBox3
dt = TextBox3
Sheets(«hoja1»).Hyperlinks.Add Anchor:=Sheets(«hoja1»).Cells(uf + 1, 3), Address:=m, TextToDisplay:=dt
TextBox1 = Clear
TextBox2 = Clear
TextBox3 = Clear
End Sub

Private Sub CommandButton2_Click()
Unload Me
End Sub

Si te fue de utilidad puedes INVITARME UN CAFÉ y de esta manera ayudar a seguir manteniendo la página, CLICK para descargar en ejemplo en forma gratuita.


(adsbygoogle = window.adsbygoogle || []).push({});

If this post was helpful INVITE ME A COFFEE and so help keep up the page, CLICK to download free example.

Si te gustó por favor compártelo con tus amigos
If you liked please share it with your friends      

Entradas relacionadas

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Comentarios (28)

I think the admin of this web page is in fact working hard for his website,
because here every material is quality based material.

Responder

Awesome things here. I am very satisfied to look your article.
Thank you so much and I am taking a look forward to touch you.

Will you please drop me a e-mail?

Responder

What’s Taking place i’m new to this, I stumbled upon this I’ve found
It positively helpful and it has aided me out loads.

I’m hoping to contribute & aid different customers like its helped me.
Great job.

Responder

hello!,I really like your writing so a lot! percentage we keep in touch extra approximately your post on AOL?
I require a specialist on this house to solve my problem.
Maybe that’s you! Looking ahead to see you.

Responder

Great delivery. Solid arguments. Keep up the amazing
spirit.

Responder

My brother recommended I might like this blog.
He was entirely right. This post actually made my day.
You cann’t imagine simply how much time I had spent for this info!
Thanks!

Responder

Hi, Neat post. There is a problem together with your web site in web explorer,
may check this? IE nonetheless is the marketplace chief and
a good element of other people will miss your great writing due
to this problem.

Responder

Oh my goodness! Awesome article dude! Thank you so much, However
I am having difficulties with your RSS. I don’t understand why
I can’t join it. Is there anybody else getting similar RSS problems?
Anyone who knows the solution will you kindly respond?
Thanks!!

Responder

Fantastic beat ! I would like to apprentice whilst you amend your site, how could
i subscribe for a weblog website? The account aided
me a appropriate deal. I have been a little bit acquainted
of this your broadcast provided brilliant clear concept

Responder

Thanks for the marvelous posting! I certainly enjoyed reading it, you will be
a great author. I will always bookmark your blog
and will often come back later in life. I want to encourage
continue your great posts, have a nice day!

Responder

Greetings! I know this is kind of off topic but I was wondering if you knew where I
could locate a captcha plugin for my comment form?
I’m using the same blog platform as yours and I’m having trouble finding one?
Thanks a lot!

Responder

I am actually happy to glance at this website posts which carries plenty of valuable data, thanks for
providing these statistics.

Responder

Hey there! I could have sworn I’ve been to this site before but after browsing through some of the post
I realized it’s new to me. Anyways, I’m definitely happy I found
it and I’ll be bookmarking and checking back frequently!

Responder

I am in fact glad to glance at this webpage posts which
carries tons of useful data, thanks for providing these information.

Responder

Appreciate the recommendation. Let me try it out.

Responder

I couldn’t refrain from commenting. Well written!

Responder

I every time emailed this webpage post page to all my associates, since if
like to read it afterward my friends will too.

Responder

Hi there everyone, it’s my first pay a visit at this website, and
piece of writing is in fact fruitful for me, keep up posting these articles.

Responder

It’s nearly impossible to find experienced people for this subject, however, you
seem like you know what you’re talking about!
Thanks

Responder

If you are going for finest contents like myself, only visit this web
page everyday for the reason that it gives quality contents, thanks

Responder

I will immediately grab your rss as I can not find your e-mail subscription hyperlink or newsletter service.
Do you have any? Please let me realize so that I may subscribe.
Thanks.

Responder

Excellent post. I was checking continuously this blog
and I’m impressed! Extremely helpful information specifically the last part 🙂 I care
for such information a lot. I was looking for this certain information for a long
time. Thank you and good luck.

Responder

fantastic post, very informative. I’m wondering why the opposite experts of this sector do not realize this.
You must continue your writing. I’m sure, you’ve a great readers’ base already!

Responder

I know this site gives quality depending content and other material,
is there any other web site which offers these kinds of things in quality?

Responder

Remarkable issues here. I am very glad to see your
post. Thanks so much and I’m taking a look forward to contact you.
Will you kindly drop me a mail?

Responder

Hi there are using WordPress for your blog platform? I’m new to
the blog world but I’m trying to get started
and create my own. Do you need any coding expertise to make your own blog?
Any help would be greatly appreciated!

Responder

Thank you for some other informative website.
The place else may just I get that type of information written in such a perfect approach?

I have a venture that I am just now running on, and I’ve been at the glance out for
such information.

Responder

It’s going to be finish of mine day, but before ending I am reading this wonderful paragraph
to improve my knowledge.

Responder