howzit guys..
the following sub creates an Excel object, manipulates it,
then saves it to disc.the "Intellisence" feature of oExcel and oBook doesnt jump.VB Code:
Private Sub Expo(ByVal t As String, ByVal name As String) Dim tmp As String tmp = "c:\Done Reports\" & Date.Today.ToString("MMM,dd") & "\" & Me.Name.ToString If Directory.Exists(tmp) = False Then Directory.CreateDirectory(tmp) Dim oExcel As Object Dim oBook As Object oExcel = CreateObject("Excel.Application") oBook = oExcel.Workbooks.Add oBook.worksheets(1).range("A1").select() oBook.worksheets(1).paste() System.Windows.Forms.Clipboard.Clear() System.Windows.Forms.Clipboard.SetDataObject(t) oBook.worksheets(1).range("A44").select() oBook.worksheets(1).paste() oBook.SaveAs(tmp & "\" & name & ".xls") oExcel.Quit() oExcel = Nothing GC.Collect() End Sub
i.e. for oExcel Intellisence options are 5 methods (tostring, gettype etc..)
maybe is a declaration issue.. here are the declarations:VB Code:
Imports system Imports System.IO Imports System.Data Imports System.Data.SqlClient Imports System.Windows.Forms Imports GraphicsServer.GSNet.Charting Imports GraphicsServer.GSNet.SeriesData Imports System.Drawing Imports Microsoft.Office Imports Microsoft.Office.Interop
any idea why intellisence doesnt pop???
thanks in advance for suggestions
regards,
-j





Reply With Quote