Combo Box Event

dmcgimpsey

Active Member
Joined
Mar 30, 2004
Messages
268
Hi Folks

I have a combo box, that has a list of selection items.

I have the VBA code set up to send the user to a website based on the selection they make - as follows;

Private Sub ComboBox1_Change()
Dim hlink As String
hlink = ComboBox1.Value
hlink = "C:\Model Vision\html\m" & hlink & ".htm"
If Dir$(hlink) <> "" Then
' ActiveWorkbook.FollowHyperlink Address:=hlink, NewWindow:=True
Shell "C:\WINDOWS\hh.exe " & hlink, vbMaximizedFocus
Else: MsgBox ("File Not Found, Please Try Again")
End If
End Sub


Problem:

I want the user to be able to any value, but as soon as they type a character, the program goes off and tries to display a page. I could be using the wrong event, is there an "Enter" event or a "Select" event ?

Thanks

Don
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,206,713
Messages
6,074,482
Members
446,071
Latest member
gaborfreeman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top