Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Library Not Registered

I'm running the following code in an Excel macro, to open up a powerpoint
document from within Excel. It works fine on my computer and on the
computers of two other users. When I try to run it on one computer, though,
I get an error message "Library Not Registered" when it gets to the line "Set
app = New PowerPoint.Application". Any thoughts of how to fix this would be
greatly appreciated...THANKS!

Function GetPPT() As PowerPoint.Presentation
'this procedure opens a powerpoint presentation for output
Dim app As PowerPoint.Application
Dim strFile As String


strFile = Application.GetOpenFilename("(*.ppt), *.ppt", , "Open File")

If strFile = "False" Then

Else
Set app = New PowerPoint.Application
app.Visible = msoTrue
Set GetPPT = app.Presentations.Open(Filename:=strFile, ReadOnly:=msoFalse)
End If

End Function

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Library Not Registered

Here is one explanation:

http://support.microsoft.com/kb/274038

"Jay" wrote:

I'm running the following code in an Excel macro, to open up a powerpoint
document from within Excel. It works fine on my computer and on the
computers of two other users. When I try to run it on one computer, though,
I get an error message "Library Not Registered" when it gets to the line "Set
app = New PowerPoint.Application". Any thoughts of how to fix this would be
greatly appreciated...THANKS!

Function GetPPT() As PowerPoint.Presentation
'this procedure opens a powerpoint presentation for output
Dim app As PowerPoint.Application
Dim strFile As String


strFile = Application.GetOpenFilename("(*.ppt), *.ppt", , "Open File")

If strFile = "False" Then

Else
Set app = New PowerPoint.Application
app.Visible = msoTrue
Set GetPPT = app.Presentations.Open(Filename:=strFile, ReadOnly:=msoFalse)
End If

End Function

  #3   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Library Not Registered

YIKES! Any other advice LOL? I'll keep reading through this to see if I can
figure it out. Thanks,

Jay

"JLGWhiz" wrote:

Here is one explanation:

http://support.microsoft.com/kb/274038

"Jay" wrote:

I'm running the following code in an Excel macro, to open up a powerpoint
document from within Excel. It works fine on my computer and on the
computers of two other users. When I try to run it on one computer, though,
I get an error message "Library Not Registered" when it gets to the line "Set
app = New PowerPoint.Application". Any thoughts of how to fix this would be
greatly appreciated...THANKS!

Function GetPPT() As PowerPoint.Presentation
'this procedure opens a powerpoint presentation for output
Dim app As PowerPoint.Application
Dim strFile As String


strFile = Application.GetOpenFilename("(*.ppt), *.ppt", , "Open File")

If strFile = "False" Then

Else
Set app = New PowerPoint.Application
app.Visible = msoTrue
Set GetPPT = app.Presentations.Open(Filename:=strFile, ReadOnly:=msoFalse)
End If

End Function

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Library Not Registered

In the Tools menu, References, if you see any references marked MISSING,
uncheck close the dialog and start again

Scroll down and check "Microsoft Powerpoint x.0 Object Library" where x
refers to the Office version.

If there's any possibility the file will be used with in lower version,
forget about the reference (indeed remove it if it exists) and adapt to
"Late Binding".
Briefly, this means changing and PP related declarations to "As Object",
also changing any PP constants to their intrinsic values (not that I see any
in your code snippet).

Change
Function GetPPT() As PowerPoint.Presentation
Dim app as PowerPoint.Application
Set app = New PowerPoint.Application
to
Function GetPPT() As Object
Dim app as Object
Set app = CreateObject("powerpoint.application")

Elsewhere you will probably need to change other As PowerPoint.something to
As Object

Code may run slightly slower (though you might not notice) and you will lose
intellisense.

Regards,
Peter T

"Jay" wrote in message
...
I'm running the following code in an Excel macro, to open up a powerpoint
document from within Excel. It works fine on my computer and on the
computers of two other users. When I try to run it on one computer,
though,
I get an error message "Library Not Registered" when it gets to the line
"Set
app = New PowerPoint.Application". Any thoughts of how to fix this would
be
greatly appreciated...THANKS!

Function GetPPT() As PowerPoint.Presentation
'this procedure opens a powerpoint presentation for output
Dim app As PowerPoint.Application
Dim strFile As String


strFile = Application.GetOpenFilename("(*.ppt), *.ppt", , "Open File")

If strFile = "False" Then

Else
Set app = New PowerPoint.Application
app.Visible = msoTrue
Set GetPPT = app.Presentations.Open(Filename:=strFile, ReadOnly:=msoFalse)
End If

End Function



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Library not registered. Kart Excel Discussion (Misc queries) 0 February 17th 09 11:21 AM
Library not registered Error Message Noemi Excel Programming 0 November 22nd 07 04:12 AM
VB Error Object Library Not Registered Karine Rivet Excel Discussion (Misc queries) 2 April 11th 06 07:13 PM
Object Library Not Registered rgarner[_2_] Excel Programming 0 August 24th 04 09:46 PM
'Object library not registered' in Excel97 Humberto Excel Programming 3 August 11th 03 02:41 PM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"