Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I don't see the problem - HELP

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
This code should be displaying a VB drop-down box but it is NOT. I don't know why. Thanks in advance.

Private Sub ComboBox1_Change()
Dim EmailAddress As String
Dim AddressCell As String
Dim DataRange As String

AddressCell = "N4"
DataRange = "T4:U21"

EmailAddress = WorksheetFunction.VLookup(ActiveSheet.Range(ComboBox1.LinkedCell), ActiveSheet.Range(DataRange), 2, False)

ActiveSheet.Range(AddressCell).Select
ActiveCell.Value = EmailAddress

If EmailAddress <> &quot;&quot; Then
With ActiveSheet
.Hyperlinks.Add.Range (AddressCell), &quot;mailto:&quot; & EmailAddress
End With
End If

End Sub &quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr Clown
%>
 
Jr Clown,

I wrote that code a while ago. I have sent you the Excel file it is used on. You should be able to edit it to what you want.
 
Yes you did, I was hoping you would see it. I have made all the changes necessary and it's not working. &quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr Clown
%>
 
Actually Peter, let's talk it over. If I send you the file you will fix it and I won't learn. I've walked thru the coding and don't see it. I want to be able to understand it now have you fix it. Hope this is ok with you. &quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr Clown
%>
 
If you send me the file I can find the problem then talk it over.

I believe there is nothing wrong with the code, I believe it is the way you have setup the combobox?? and sheet.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top