Message 1 of 4
GoExcel issues after Excel upgrade ("MyFile.xlsx is already open.")

Not applicable
11-10-2020
12:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
"OriginalGetComponentPath" is my old code, which worked fine until my Excel was upgraded (from 2010 to 2016).
I created "TestGetComponentPath" recently for troubleshooting.
Both functions bring up a prompt saying "MyFile.xlsx is already open. Reopening will cause any changes you made to be discarded. Do you want to reopen MyFile.xlsx?" at the GoExcel.Cellvalue row.
Is there an issue with the code, or is it the new Excel installation?
Help is greatly appreciated!
Class Runme
Sub Main
Dim ComponentName As String = ""
ComponentName = OriginalGetComponentPath("MyComponent")
ComponentName = TestGetComponentPath("MyComponent")
End Sub
Public Function OriginalGetComponentPath(Denomination As String) As String
Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" & RefRow)
Return ComponentPath
End Function
Public Function TestGetComponentPath(Denomination As String) As String
GoExcel.Close
MessageBox.Show("1", "Title")
Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
MessageBox.Show("2", "Title")
GoExcel.Close
Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" & RefRow)
MessageBox.Show("3", "Title")
GoExcel.Close
MessageBox.Show("4", "Title")
Return ComponentPath
End Function
End Class
123