Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default de-activating OLEObject

Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default de-activating OLEObject

Set y = Nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default de-activating OLEObject

thanks for the response.
i gave it a try;
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
Set y = Nothing
but MS Project is still running.

Project 2003, Excel 2003


"Bob Phillips" wrote in message
...
Set y = Nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default de-activating OLEObject

That's a different matter. I am lost as to why you want to close MS Project,
perhaps you copuld explain, but perhaps you could connect to that app ands
close it from Excel. Here is how I would do it. I haven't tested with M S
Project as I don't use that, but I tested it with Word, same principle

Dim oApp As Object

Set oApp = GetObject(, "MSProject.Application")

oApp.Quit

Set oApp = Nothing




--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
thanks for the response.
i gave it a try;
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
Set y = Nothing
but MS Project is still running.

Project 2003, Excel 2003


"Bob Phillips" wrote in message
...
Set y = Nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default de-activating OLEObject

thanks for the help.

We have a MS Project embedded in Excel.
the user can enter info into the MS Project.
then the user clicks a button. it activates MS Project collects data and
brings into excel.




"Bob Phillips" wrote in message
...
That's a different matter. I am lost as to why you want to close MS

Project,
perhaps you copuld explain, but perhaps you could connect to that app ands
close it from Excel. Here is how I would do it. I haven't tested with M S
Project as I don't use that, but I tested it with Word, same principle

Dim oApp As Object

Set oApp = GetObject(, "MSProject.Application")

oApp.Quit

Set oApp = Nothing




--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
thanks for the response.
i gave it a try;
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
Set y = Nothing
but MS Project is still running.

Project 2003, Excel 2003


"Bob Phillips" wrote in message
...
Set y = Nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks













  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default de-activating OLEObject

so does my suggestion work?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
thanks for the help.

We have a MS Project embedded in Excel.
the user can enter info into the MS Project.
then the user clicks a button. it activates MS Project collects data and
brings into excel.




"Bob Phillips" wrote in message
...
That's a different matter. I am lost as to why you want to close MS

Project,
perhaps you copuld explain, but perhaps you could connect to that app

ands
close it from Excel. Here is how I would do it. I haven't tested with M

S
Project as I don't use that, but I tested it with Word, same principle

Dim oApp As Object

Set oApp = GetObject(, "MSProject.Application")

oApp.Quit

Set oApp = Nothing




--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
thanks for the response.
i gave it a try;
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
Set y = Nothing
but MS Project is still running.

Project 2003, Excel 2003


"Bob Phillips" wrote in message
...
Set y = Nothing

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,
I have an excel worksheet with an embedded MS Project file.
to get at the ms project i do the following:
Set y = ThisWorkbook.Sheets("MS Project").OLEObjects(1)
y.Verb
but how can i de-activate it?
thanks













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
Get OLEObject.Object with Csharp Bragadiru Excel Programming 0 November 3rd 04 08:22 AM
Get OLEObject with CSharp Bragadiru Excel Programming 0 November 2nd 04 03:31 PM
OLEObject GetFocus Erich Neuwirth Excel Programming 1 August 11th 04 08:18 PM
OLEObject on worksheet. Trying to get value from it. Grant Excel Programming 4 August 9th 04 06:00 AM
OLEobject on the sheet Ryan[_6_] Excel Programming 1 August 3rd 03 03:15 PM


All times are GMT +1. The time now is 04:07 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"