You're the first to report that problem as far as I know.
We actually don't have the facilities to put out a new version of the Excel 97 add-in anymore.
I took a quick look at the old code and I came up with a fix that you can apply directly to your XLA file.
To do so, do the following:
1. Make a copy of the "EViews Add-In.xla" file located in your EViews subdirectory. Place a copy onto your desktop.
2. Double-click the file to open in Excel.
3. Press CTRL-F11 to open the VBA editor.
4. In the left tree view, right-click "frmManage" under VBAProject->Forms and select "View Code".
5. In the code editor (on the right), select "cmdRemove" in the top left dropdown. The right dropdown should be on "Click".
6. Replace the entire function there with the following replacement:
Code: Select all
Private Sub cmdRemove_Click()
Const METHODNAME As String = "cmdRemove_Click"
Dim lsStatus As String
Dim lsSheet As String
Dim lsRange As String
Dim liListIndex As Integer
Dim wsht As Worksheet
Dim qt As QueryTable
Dim found As Boolean
Dim li As Variant
On Error GoTo errorhandler
If lbxMain.ListIndex < 1 Then
Exit Sub
End If
Dim vbRet As VbMsgBoxResult
Dim msg As String
vbRet = MsgBox("Clear data as well?", vbYesNoCancel Or vbDefaultButton2 Or vbQuestion, "Confirm")
If vbRet = vbCancel Then
GoTo exithandler
End If
Dim cnt As Integer
cnt = lbxMain.ListCount
'first get a list of all selected items...
Dim selected As New Collection
For liListIndex = cnt To 1 Step -1
If lbxMain.selected(liListIndex) Then
selected.Add liListIndex
End If
Next
For Each li In selected
lsRange = lbxMain.List(li, 1)
Set qt = GetQT(lsRange, wsht)
If Not qt Is Nothing Then
If vbRet = vbYes Then
qt.ResultRange.Clear
End If
'because this qt might be under a listobject,
'we'll call a common routine to delete it
Call DeleteQT(wsht, qt)
lbxMain.RemoveItem li
End If
Next
exithandler:
On Error Resume Next
Exit Sub
errorhandler:
Dim res As VbMsgBoxResult
res = EV_DisplayError(METHODNAME, lsStatus, Err.Description, Err.Number)
Select Case res
Case vbRetry
Stop
Resume
Case vbAbort
Resume exithandler
Case vbIgnore
Resume Next
End Select
End Sub
7. Once replaced, click on the Debug menu/Compile VBA Project to make sure there are no compile errors.
8. Finally, click the Save icon to save the changes. Close the editor window and close Excel. If Excel asks to save changes, click Yes.
9. Copy the XLA file back into the EViews subdirectory.
10. Run EViews, then type in the command "REGCOMPONENTS" to open the Register Components dialog. Click "Yes (All)" to re-register everything. This should overwrite your Excel's add-in with the new one you just edited.
11. Restart Excel and try your remove connections again.
Feel free to play around with this code. This version of the add-in was released just as an example of how you can use our OLEDB driver.
If you ever reinstall EViews again (and you still need this older addin), you should make a backup copy of the XLA file you edited so you can re-instate it after a re-install.
Steve