Click here to Skip to main content
15,879,095 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Help Me Pin
Christian Graus30-Jun-09 0:16
protectorChristian Graus30-Jun-09 0:16 
GeneralRe: Help Me Pin
dan!sh 30-Jun-09 0:21
professional dan!sh 30-Jun-09 0:21 
GeneralRe: Help Me Pin
Christian Graus30-Jun-09 10:34
protectorChristian Graus30-Jun-09 10:34 
QuestionImage reference Pin
jhp53129-Jun-09 17:22
jhp53129-Jun-09 17:22 
AnswerRe: Image reference Pin
jhp53130-Jun-09 0:17
jhp53130-Jun-09 0:17 
QuestionDropdown box display issue in vb .net Pin
Member 451421829-Jun-09 17:04
Member 451421829-Jun-09 17:04 
AnswerRe: Dropdown box display issue in vb .net Pin
Henry Minute30-Jun-09 2:50
Henry Minute30-Jun-09 2:50 
QuestionDeveloping on WinXP & Office 2003, targeting WinServer2008 & Office 2007 - getting "Retrieving the COM class factory..." error Pin
Daniel Boling29-Jun-09 11:26
Daniel Boling29-Jun-09 11:26 
Greetings,

I am writing a VB.NET console application that does nothing but read from a SQLServer database and spit out an Excel file. My development box has Windows XP and Office 2003 installed. The target box is running Windows Server 2008 and Office 2007. Everything runs fine on my dev box (of course) but I'm getting this error whenever I run it on the target box: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

I felt like I've searched the entire Internet looking for a solution but to no avail. Some solutions that specifically mention that CLSID involve ASP.NET configurations and DCOM properties. Since mine is an executable and not a web page, those solutions don't seem to apply. I went ahead and tried anyway, granting the application's User ID specific permissions to the Excel DCOM object, but that didn't fix my problem. I read somewhere that error 80070005 was a permissions error but the application's User ID is a member of the Admins group so I'd think that user has all the permissions it needs.

Here's part of my current code and a note on which line is causing the failure:

Imports Microsoft.Office.Interop.Excel

Public Function fExportToExcel() As Boolean

    Dim xlApp As Microsoft.Office.Interop.Excel.Application
    Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
    Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
    Dim missingValue As Object = System.Reflection.Missing.Value


    Try

      xlApp = New Microsoft.Office.Interop.Excel.Application        <code><<== FAILS HERE</code>
      xlBook = xlApp.Workbooks.Add(missingValue)
      xlSheet = CType(xlBook.Sheets("Sheet1"), Microsoft.Office.Interop.Excel.Worksheet)
      xlSheet.Name = My.Application.Info.AssemblyName.ToString

<snip>
I've set a reference to the Microsoft Excel 11.0 Object Library in my app. Here are two of it's properties:
Identity {00020813-0000-0000-C000-000000000046}\1.5\0\primary<br />
Path C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Excel\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll


I don't quite understand what a CLSID is or how it works. Does it mean anything that my Identity CLSID ({00020813-0000-0000-C000-000000000046}) is different than that in my error message ({00024500-0000-0000-C000-000000000046})?

So is it possible to develop an app using one version of the OS and Office but target a different OS and Office? If so, do I account for those differences in my app or do I have to make some kind of change(s) to the target box? What property or code changes do I need to make? Any help will certainly be appreciated!

Thanks!
Dan
AnswerRe: Developing on WinXP & Office 2003, targeting WinServer2008 & Office 2007 - getting "Retrieving the COM class factory..." error Pin
Christian Graus29-Jun-09 13:21
protectorChristian Graus29-Jun-09 13:21 
AnswerRe: Developing on WinXP & Office 2003, targeting WinServer2008 & Office 2007 - getting "Retrieving the COM class factory..." error Pin
EliottA29-Jun-09 13:53
EliottA29-Jun-09 13:53 
GeneralRe: Developing on WinXP & Office 2003, targeting WinServer2008 & Office 2007 - getting "Retrieving the COM class factory..." error Pin
Daniel Boling30-Jun-09 2:41
Daniel Boling30-Jun-09 2:41 
GeneralRe: Developing on WinXP & Office 2003, targeting WinServer2008 & Office 2007 - getting "Retrieving the COM class factory..." error Pin
EliottA30-Jun-09 2:48
EliottA30-Jun-09 2:48 
QuestionMS VB 2008 express, install for all users Pin
Jesper hoegh29-Jun-09 9:12
Jesper hoegh29-Jun-09 9:12 
AnswerRe: MS VB 2008 express, install for all users Pin
Dave Kreskowiak29-Jun-09 9:45
mveDave Kreskowiak29-Jun-09 9:45 
Questionmake limit time to the vedio capture Pin
my30name29-Jun-09 5:31
my30name29-Jun-09 5:31 
AnswerRe: make limit time to the vedio capture Pin
garfield18529-Jun-09 5:34
garfield18529-Jun-09 5:34 
GeneralRe: make limit time to the vedio capture [modified] Pin
my30name29-Jun-09 22:56
my30name29-Jun-09 22:56 
QuestionString$ function Pin
garfield18529-Jun-09 5:12
garfield18529-Jun-09 5:12 
AnswerRe: String$ function Pin
Nagy Vilmos29-Jun-09 5:35
professionalNagy Vilmos29-Jun-09 5:35 
AnswerRe: String$ function Pin
Luc Pattyn29-Jun-09 5:35
sitebuilderLuc Pattyn29-Jun-09 5:35 
GeneralRe: String$ function Pin
garfield18529-Jun-09 5:46
garfield18529-Jun-09 5:46 
GeneralRe: String$ function Pin
Luc Pattyn29-Jun-09 7:00
sitebuilderLuc Pattyn29-Jun-09 7:00 
Questioncrystal report problem in after installation ? Pin
JC.KaNNaN29-Jun-09 4:44
JC.KaNNaN29-Jun-09 4:44 
AnswerRe: crystal report problem in after installation ? Pin
EliottA29-Jun-09 5:08
EliottA29-Jun-09 5:08 
QuestionHow to chek file is in Progress Pin
Anubhava Dimri29-Jun-09 0:46
Anubhava Dimri29-Jun-09 0:46 

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.