hyperlink

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
In the click event of a button,i have input the following code:If [Language]
= "Greek" Then Command48.HyperlinkAddress = "\\10.43.0.132\Company\MSKB\Auto
Reply\Greek.doc"
If [Language] = "Hebrew" Then Command48.HyperlinkAddress =
"\\10.43.0.132\Company\MSKB\Auto Reply\Hebrew.doc"
Now i need urgently that if [language] is something else other than "greek"
or "hebrew" the hyperlink is deleted..
 
Hi all,
In the click event of a button,i have input the following code:If [Language]
= "Greek" Then Command48.HyperlinkAddress = "\\10.43.0.132\Company\MSKB\Auto
Reply\Greek.doc"
If [Language] = "Hebrew" Then Command48.HyperlinkAddress =
"\\10.43.0.132\Company\MSKB\Auto Reply\Hebrew.doc"
Now i need urgently that if [language] is something else other than "greek"
or "hebrew" the hyperlink is deleted..


Have you tried setting it to an empty string?

Command48.HyperlinkAddress = ""
 
Yes I did,
But it gives me an error message.

storrboy said:
Hi all,
In the click event of a button,i have input the following code:If [Language]
= "Greek" Then Command48.HyperlinkAddress = "\\10.43.0.132\Company\MSKB\Auto
Reply\Greek.doc"
If [Language] = "Hebrew" Then Command48.HyperlinkAddress =
"\\10.43.0.132\Company\MSKB\Auto Reply\Hebrew.doc"
Now i need urgently that if [language] is something else other than "greek"
or "hebrew" the hyperlink is deleted..


Have you tried setting it to an empty string?

Command48.HyperlinkAddress = ""
 
Interesting, what error message? When I try it, it just does nothing
as you'd expect it to with the address set to "". Are you using the a
form reference? Either Forms("frmName"). or Me! in front of Command48
(I forgot to type that in my first response).
 
the error message " Type mismatch",and here's the exact thing i use :
If [Language]
= "Greek" Then Command48.HyperlinkAddress = "\\10.43.0.132\Company\MSKB\Auto
Reply\Greek.doc"
If [Language] = "Hebrew" Then Command48.HyperlinkAddress =
"\\10.43.0.132\Company\MSKB\Auto Reply\Hebrew.doc"
 
If [Language] is a textbox or other control on a form then your usage
won't work. Nor will it work by only citing Command48. whatever. Also,
if you have many If statements to deal with it may be better to use a
Select Case statement.

Dim urlAdd As String
Select Case Me!Language
Case "Greek"
urlAdd = "\\10.43.0.132\Company\MSKB\Auto Reply\Greek.doc"
Case "Hebrew"
urlAdd = "\\10.43.0.132\Company\MSKB\Auto Reply\Hebrew.doc"
Case Else
urlAdd = ""
End Select

Me!Command48.HyperlinkAddress = urlAdd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top