Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default what is the vba language to make hyperlink?

I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default what is the vba language to make hyperlink?

I would use a formula in an adjacent cell:

=hyperlink("File:////" & a1 & ".dwg","Click Me")

if I were entering A100 in cell A1.

Anton wrote:

I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default what is the vba language to make hyperlink?

Thx for the answer, Dave but I still can't do it. This is my programme
Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet3.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text
LastRow.Offset(1, 3).Value = TextBox4.Text
LastRow.Offset(1, 4).Value = TextBox5.Text
LastRow.Offset(1, 5).Value = TextBox6.Text
LastRow.Offset(1, 6).Value = TextBox7.Text
LastRow.Offset(1, 7).Value = TextBox8.Text
LastRow.Offset(1, 8).Value = TextBox9.Text
LastRow.Offset(1, 9).Value = TextBox10.Text
MsgBox "One entry added to Database"

End If

response = MsgBox("Do you want to add another entry?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

TextBox1.SetFocus

Else
MsgBox "Thank you, God bless you"
Unload Me
End If

End Sub

Private Sub CommandButton2_Click()
MsgBox "Thank you, God bless you"
End
End Sub

basically it is just textbox for people to enter data and I want the entry
into textbox9 to be a hyperlink that links to ENTRY.dwg. let say the person
enters ANTON in textbox9 the entry will become hyperlink to the file
ANTON.dwg. Hope this helps to give a clearer picture.


Thanks lots!




"Dave Peterson" wrote:

I would use a formula in an adjacent cell:

=hyperlink("File:////" & a1 & ".dwg","Click Me")

if I were entering A100 in cell A1.

Anton wrote:

I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default what is the vba language to make hyperlink?

If you want to use another cell to hold the hyperlink, then try my suggestion.
If you want the insert|Hyperlink version, then try GVTV06's suggestion.

Anton wrote:

Thx for the answer, Dave but I still can't do it. This is my programme
Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet3.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text
LastRow.Offset(1, 3).Value = TextBox4.Text
LastRow.Offset(1, 4).Value = TextBox5.Text
LastRow.Offset(1, 5).Value = TextBox6.Text
LastRow.Offset(1, 6).Value = TextBox7.Text
LastRow.Offset(1, 7).Value = TextBox8.Text
LastRow.Offset(1, 8).Value = TextBox9.Text
LastRow.Offset(1, 9).Value = TextBox10.Text
MsgBox "One entry added to Database"

End If

response = MsgBox("Do you want to add another entry?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

TextBox1.SetFocus

Else
MsgBox "Thank you, God bless you"
Unload Me
End If

End Sub

Private Sub CommandButton2_Click()
MsgBox "Thank you, God bless you"
End
End Sub

basically it is just textbox for people to enter data and I want the entry
into textbox9 to be a hyperlink that links to ENTRY.dwg. let say the person
enters ANTON in textbox9 the entry will become hyperlink to the file
ANTON.dwg. Hope this helps to give a clearer picture.

Thanks lots!

"Dave Peterson" wrote:

I would use a formula in an adjacent cell:

=hyperlink("File:////" & a1 & ".dwg","Click Me")

if I were entering A100 in cell A1.

Anton wrote:

I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default what is the vba language to make hyperlink?

I see you've started a new thead.

I'll bow out.

Dave Peterson wrote:

If you want to use another cell to hold the hyperlink, then try my suggestion.
If you want the insert|Hyperlink version, then try GVTV06's suggestion.

Anton wrote:

Thx for the answer, Dave but I still can't do it. This is my programme
Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet3.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text
LastRow.Offset(1, 3).Value = TextBox4.Text
LastRow.Offset(1, 4).Value = TextBox5.Text
LastRow.Offset(1, 5).Value = TextBox6.Text
LastRow.Offset(1, 6).Value = TextBox7.Text
LastRow.Offset(1, 7).Value = TextBox8.Text
LastRow.Offset(1, 8).Value = TextBox9.Text
LastRow.Offset(1, 9).Value = TextBox10.Text
MsgBox "One entry added to Database"

End If

response = MsgBox("Do you want to add another entry?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

TextBox1.SetFocus

Else
MsgBox "Thank you, God bless you"
Unload Me
End If

End Sub

Private Sub CommandButton2_Click()
MsgBox "Thank you, God bless you"
End
End Sub

basically it is just textbox for people to enter data and I want the entry
into textbox9 to be a hyperlink that links to ENTRY.dwg. let say the person
enters ANTON in textbox9 the entry will become hyperlink to the file
ANTON.dwg. Hope this helps to give a clearer picture.

Thanks lots!

"Dave Peterson" wrote:

I would use a formula in an adjacent cell:

=hyperlink("File:////" & a1 & ".dwg","Click Me")

if I were entering A100 in cell A1.

Anton wrote:

I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default what is the vba language to make hyperlink?

On Jan 10, 6:55*pm, Anton wrote:
I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg. *

Thank you


add this in your macro (assuming the value is in cell C1)

Dim i As String
i = Range("C1").Value
If Range("C1").Value < 0 Then
Range("C1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:= _
i & ".dwg", TextToDisplay:=i
End If
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default what is the vba language to make hyperlink?

Thx for the answer, GTVT but I still can't do it. This is my programme
Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet3.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text
LastRow.Offset(1, 3).Value = TextBox4.Text
LastRow.Offset(1, 4).Value = TextBox5.Text
LastRow.Offset(1, 5).Value = TextBox6.Text
LastRow.Offset(1, 6).Value = TextBox7.Text
LastRow.Offset(1, 7).Value = TextBox8.Text
LastRow.Offset(1, 8).Value = TextBox9.Text
LastRow.Offset(1, 9).Value = TextBox10.Text
MsgBox "One entry added to Database"

End If

response = MsgBox("Do you want to add another entry?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""

TextBox1.SetFocus

Else
MsgBox "Thank you, God bless you"
Unload Me
End If

End Sub

Private Sub CommandButton2_Click()
MsgBox "Thank you, God bless you"
End
End Sub

basically it is just textbox for people to enter data and I want the entry
into textbox9 to be a hyperlink that links to ENTRY.dwg. let say the person
enters ANTON in textbox9 the entry will become hyperlink to the file
ANTON.dwg. Hope this helps to give a clearer picture.


Thanks lots!

"GTVT06" wrote:

On Jan 10, 6:55 pm, Anton wrote:
I can't seem to find the answer to this question. Could somebody help me with
this? I am using a macro in excel for data entry and I want one of the
entries to be hyperlink once it is added. and the address of the hyperlink is
DWG file of that entry. So let say I enter A100, I want it to be hyperlink to
A100.dwg.

Thank you


add this in your macro (assuming the value is in cell C1)

Dim i As String
i = Range("C1").Value
If Range("C1").Value < 0 Then
Range("C1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:= _
i & ".dwg", TextToDisplay:=i
End If

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change German language data into Eglish Language in a colum Execel work sheet language problems Excel Discussion (Misc queries) 1 October 29th 07 09:59 PM
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
language support in excel sheet using a third party language tool seema Excel Worksheet Functions 0 March 13th 06 06:06 AM
How do you cut a paste a macro or VB language in Excel and make it Angela Excel Programming 13 December 8th 05 09:48 PM
How to change the excel format from language to language? zee Excel Discussion (Misc queries) 2 January 30th 05 06:51 PM


All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"