Grimalkyne
Member
- Joined
- Feb 21, 2005
- Messages
- 7
- Programming Experience
- 5-10
Using Excel 2007 and Visual Studio 2003
This function throws a target invocation exception
Private Function ExcelNewSeries(ByVal sercol As Excel.SeriesCollection) As Excel.Series
Dim series As Excel.Series
series = CType(sercol, Object).GetType.InvokeMember("NewSeries",
Reflection.BindingFlags.InvokeMethod,
Nothing, sercol, Nothing, m_CurrentCultureInfo)
Return series
End Function
Can anyone shed any light on how to fix it?
Thanks in advance
Grimalkyne
This function throws a target invocation exception
Private Function ExcelNewSeries(ByVal sercol As Excel.SeriesCollection) As Excel.Series
Dim series As Excel.Series
series = CType(sercol, Object).GetType.InvokeMember("NewSeries",
Reflection.BindingFlags.InvokeMethod,
Nothing, sercol, Nothing, m_CurrentCultureInfo)
Return series
End Function
Can anyone shed any light on how to fix it?
Thanks in advance
Grimalkyne