Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Is it possible from VBA to run excel as administrator?

Is it possible from VBA to run excel as administrator so that VBA routines that create an instance of Outlook or Word will run as per normal.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Is it possible from VBA to run excel as administrator?

Is it possible from VBA to run excel as administrator so that VBA routines
that create an instance of Outlook or Word will run as per normal.


Please explain what you mean by "run as per normal". (What abnormal behaviour
are you getting?)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Is it possible from VBA to run excel as administrator?

On Thursday, December 21, 2017 at 3:42:30 PM UTC+11, GS wrote:
Is it possible from VBA to run excel as administrator so that VBA routines
that create an instance of Outlook or Word will run as per normal.


Please explain what you mean by "run as per normal". (What abnormal behaviour
are you getting?)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


If Excel is not running as an administrator the vba routine that creates the object (CreateObject("Outlook.Application")) doesn't have permission to create an instance of Outlook (or Word).

It works okay on my computer as I have excel set to run as administrator, but it doesn't work on other computers. I can't go an change the settings on all the other computers.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Is it possible from VBA to run excel as administrator?

Am 21.12.2017 um 22:47 schrieb :
On Thursday, December 21, 2017 at 3:42:30 PM UTC+11, GS wrote:
Is it possible from VBA to run excel as administrator so that VBA routines
that create an instance of Outlook or Word will run as per normal.

Please explain what you mean by "run as per normal". (What abnormal behaviour
are you getting?)

--
Garry

Free usenet access at
http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

If Excel is not running as an administrator the vba routine that creates the object (CreateObject("Outlook.Application")) doesn't have permission to create an instance of Outlook (or Word).

It works okay on my computer as I have excel set to run as administrator, but it doesn't work on other computers. I can't go an change the settings on all the other computers.


Check the dcom settings to see if they are correct and change them if
necessary.

Some hints can be found he
https://stackoverflow.com/questions/...mission-denied

Ulrich

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Is it possible from VBA to run excel as administrator?

On Thursday, December 21, 2017 at 3:42:30 PM UTC+11, GS wrote:
Is it possible from VBA to run excel as administrator so that VBA routines
that create an instance of Outlook or Word will run as per normal.


Please explain what you mean by "run as per normal". (What abnormal
behaviour are you getting?)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


If Excel is not running as an administrator the vba routine that creates the
object (CreateObject("Outlook.Application")) doesn't have permission to
create an instance of Outlook (or Word).

It works okay on my computer as I have excel set to run as administrator, but
it doesn't work on other computers. I can't go an change the settings on all
the other computers.


Ulrich makes a good point!

Otherwise you can create more than 1 instance of Outlook so the practice is to
check 1st if it's already running using:

Dim appOL As Object, appWD As Object

Set appOL = GetObject("Outlook.Application")
If appOL Is Nothing Then Set appOL = CreateObject("Outlook.Application")

Word on the other hand IS a multi-instance app same as Excel is.

Note also that automated instances are not visible until you set their Visible
property = True. Also, users won't have control until you set the UserControl
property = True.

As far as permissions go.., if a user has permission to use MS Office then
automating its counterparts is allowed.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
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
How do I tell Excel that I am the administrator? Kevin Excel Discussion (Misc queries) 2 August 15th 09 12:20 AM
How administrator can delete temporary excel file generated on se Suhas Sakalikar Excel Discussion (Misc queries) 9 June 8th 06 12:47 PM
Excel macro works only for administrator Free Agent99 Excel Discussion (Misc queries) 12 May 15th 06 09:25 PM
Can you create an administrator for an excel file that is not sub. Katie Excel Worksheet Functions 1 November 2nd 04 07:17 PM


All times are GMT +1. The time now is 05:23 PM.

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"