View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default open web page by clicking label1 of the form1

Muso,
Here's one way:

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long

Private Sub Label1_Click()
Call ShellExecute(0&, vbNullString, Label1.Caption, vbNullString,
vbNullString, vbNormalFocus)
End Sub

NickHK

"musa.biralo" wrote in message
ups.com...
Hi,
i am trying to open a web page, let's say www.google.com, by clicking
label in the form1. In simple words, form1 has label1 and caption is
www.google.com...i am trying to launch the web page with www.google.com
by clicking the label1. Is it possible?

your help will highly be appreciated.
Thank you.

musa.biralo