Hello all I have a piece of code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
On Error GoTo errHandler
If Target.Count > 1 Then GoTo exitHandler
Set cboTemp = ws.OLEObjects("Locations")
On Error Resume Next
If cboTemp.Visible = True Then
With cboTemp
.Top = 10
.Left = 10
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
.Value = ""
End With
End If
On Error GoTo errHandler
If Target.Validation.Type = 3 Then
'if the cell contains a data validation list
Application.EnableEvents = False
'get the data validation formula
str = Target.Validation.Formula1
'str = Right(str, Len(str) - 1)
With cboTemp
'show the combobox with the list
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 195
.Height = Target.Height + 4
.ListFillRange = ws.Range(str).Address
.LinkedCell = Target.Address
End With
cboTemp.Activate
End If
exitHandler:
Application.ScreenUpdating = True
Application.EnableEvents = True
Exit Sub
errHandler:
Resume exitHandler
End Sub
What my problem is that the OLE Object in Microsoft Excel 2010 is not there. When I open up my workbook and begin to use it and I come to the point to where I need to use my drop down combo box, I get an error saying that the object reference isn't there. I look in my references and find that my RXRadioButton is missing. I know how to fix this by copying my Roxio Shared folder into the appropriate folder. But, I am sending this file to people who are not as savvy. So, my question is, is there a way around this error in Microsoft Excel 2010?
Thank you.
I
Bookmarks