Click here to Skip to main content
15,917,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to delete Temp Files and IE history? Pin
A_Yakout27-Jun-04 19:18
A_Yakout27-Jun-04 19:18 
AnswerRe: How to delete Temp Files and IE history? Pin
Aaron Eldreth28-Jun-04 3:45
Aaron Eldreth28-Jun-04 3:45 
GeneralRe: How to delete Temp Files and IE history? Pin
Lucktas28-Jun-04 7:19
Lucktas28-Jun-04 7:19 
GeneralRe: How to delete Temp Files and IE history? Pin
Dave Kreskowiak28-Jun-04 9:48
mveDave Kreskowiak28-Jun-04 9:48 
GeneralRe: How to delete Temp Files and IE history? Pin
Dave Kreskowiak28-Jun-04 15:37
mveDave Kreskowiak28-Jun-04 15:37 
GeneralRe: How to delete Temp Files and IE history? Pin
Aaron Eldreth29-Jun-04 2:25
Aaron Eldreth29-Jun-04 2:25 
GeneralRe: How to delete Temp Files and IE history? Pin
Lucktas29-Jun-04 6:17
Lucktas29-Jun-04 6:17 
Generalopening MS Excel spreadsheet Pin
lxhan26-Jun-04 19:55
lxhan26-Jun-04 19:55 
I'm experiencing a problem w/ my application written in VB.Net. My application is suppose to open Excel, but when I try to create an object using CreateObject function it throws an exception, Specified cast is not valid.

If I declare the xlApp as Excel.ApplicationClass it works, but a get the same problem, Specified cast is not valid, on the next line, xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook).


I'm using Excel 2000 ver 9.02 and the OS is XP professional.
I decided to load the latest version InteropServices, but I'm not using Office 2002. Even though it's loaded into the system the properties for the Excel COM object is pointing to the old version of Excel 2000.

Any help would be appreciated.

A sample of the code is as follows:



Imports System.Runtime.InteropServices
Imports Excel

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet

xlApp = CType(CreateObject("Excel.Application"), Excel.Application)
xlBook = CType(xlApp.Workbooks.Add, Excel.Workbook)

GeneralRe: opening MS Excel spreadsheet Pin
tanstaafl2827-Jun-04 19:11
tanstaafl2827-Jun-04 19:11 
GeneralRe: opening MS Excel spreadsheet Pin
Anonymous6-Jul-04 9:57
Anonymous6-Jul-04 9:57 
QuestionHow can I rename an NT user using the ADSI? Pin
zzzhouzhou26-Jun-04 5:39
zzzhouzhou26-Jun-04 5:39 
AnswerRe: How can I rename an NT user using the ADSI? Pin
Dave Kreskowiak28-Jun-04 2:46
mveDave Kreskowiak28-Jun-04 2:46 
GeneralRe: How can I rename an NT user using the ADSI? Pin
zzzhouzhou26-Jul-04 17:01
zzzhouzhou26-Jul-04 17:01 
GeneralSystem.Configuration Namespace Pin
beowulfagate25-Jun-04 22:13
beowulfagate25-Jun-04 22:13 
GeneralRe: System.Configuration Namespace Pin
tanstaafl2826-Jun-04 4:23
tanstaafl2826-Jun-04 4:23 
GeneralRe: System.Configuration Namespace Pin
beowulfagate26-Jun-04 17:58
beowulfagate26-Jun-04 17:58 
GeneralRe: System.Configuration Namespace Pin
Dave Kreskowiak26-Jun-04 18:04
mveDave Kreskowiak26-Jun-04 18:04 
GeneralRe: System.Configuration Namespace Pin
beowulfagate27-Jun-04 13:35
beowulfagate27-Jun-04 13:35 
GeneralRe: System.Configuration Namespace Pin
beowulfagate27-Jun-04 14:41
beowulfagate27-Jun-04 14:41 
GeneralRe: System.Configuration Namespace Pin
Dave Kreskowiak27-Jun-04 18:15
mveDave Kreskowiak27-Jun-04 18:15 
GeneralRe: System.Configuration Namespace Pin
beowulfagate27-Jun-04 20:31
beowulfagate27-Jun-04 20:31 
GeneralRe: System.Configuration Namespace Pin
Dave Kreskowiak28-Jun-04 0:36
mveDave Kreskowiak28-Jun-04 0:36 
GeneralIm a Newbie looking for ideas Pin
gazfun25-Jun-04 13:12
gazfun25-Jun-04 13:12 
GeneralRe: Im a Newbie looking for ideas Pin
Colin Angus Mackay25-Jun-04 14:15
Colin Angus Mackay25-Jun-04 14:15 
General"Too many arguments to Public Sub New()" Pin
tanstaafl2825-Jun-04 10:45
tanstaafl2825-Jun-04 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.