Referencing active instance of Excel VB.NET Implements ....

April 8, 2017 at 11:31:48
Specs: Windows 10
I came across an older post from 2010 on this site that describes a solution for referencing the active instance of Excel however, I am unsure of the ComIF statement and was hoping someone could explain this to me so I can access my active running instance to manipulate the worksheet vb.net

 Public Function ActName() As Object Implements ComIF.ActName
               Dim myxl As XL.Application
               Dim ws As XL.Worksheet

               myxl = GetObject(, "Excel.application")
               ws = myxl.ActiveSheet
               ActName = ws.Name
             End Function

The Declarations section includes this line:
Imports XL = Microsoft.Office.Interop.Excel

message edited by Noobguy


See More: Referencing active instance of Excel VB.NET Implements ....

Report •

#1
April 8, 2017 at 16:40:39
Without seeing the post in question, I'd assume ComIF is some custom interface that has more relevance to the guy in 2010 than you.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question