Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel problem using DisplayAlerts

(Posted this on scripting but recvd no answers, hopefully better luck this
time.)

I have a script that is run both locally and via remote desktop
and accesses an xls file. The access is pretty simple.
It finds a row and adds some text to various cells.

We have no problems when run locally.

However, when run via Remote Desktop, (and we believe when and
only when the remote desktop is minimized or not active on any other desktop)
we get an error msg:
"Not enough system resources to display completely."

The failure is occuring somewhere in these lines:

objDE_Excel.DisplayAlerts = vbFalse
objDE_Excel.Save
objDE_Excel.DisplayAlerts = vbTrue

I'm 90% sure it's failing on the first line, the DisplayAlerts = vbFalse.

I'm using this function because this is a shared workbook and without it,
we continually get a SaveAs dialog box which requires interaction.
Script needs to run automatically.

Any ideas ?

--
Paul Davidson


--
TIA
Paul Davidson

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Excel problem using DisplayAlerts

Odd code. Firstly when you use Save there is no prompt unless the workbook
has never been saved in which case it's the same as SaveAs. In either case
it makes no sense to try to suppress an alert. Secondly, there is no
application level Save method. You save a workbook, not Excel. Maybe
objDE_Excel.ActiveWorkbook.Save is what you want.

--
Jim
"Paul Davidson" wrote in message
...
| (Posted this on scripting but recvd no answers, hopefully better luck this
| time.)
|
| I have a script that is run both locally and via remote desktop
| and accesses an xls file. The access is pretty simple.
| It finds a row and adds some text to various cells.
|
| We have no problems when run locally.
|
| However, when run via Remote Desktop, (and we believe when and
| only when the remote desktop is minimized or not active on any other
desktop)
| we get an error msg:
| "Not enough system resources to display completely."
|
| The failure is occuring somewhere in these lines:
|
| objDE_Excel.DisplayAlerts = vbFalse
| objDE_Excel.Save
| objDE_Excel.DisplayAlerts = vbTrue
|
| I'm 90% sure it's failing on the first line, the DisplayAlerts = vbFalse.
|
| I'm using this function because this is a shared workbook and without it,
| we continually get a SaveAs dialog box which requires interaction.
| Script needs to run automatically.
|
| Any ideas ?
|
| --
| Paul Davidson
|
|
| --
| TIA
| Paul Davidson
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel problem using DisplayAlerts

Jim:

Actually, the code all works just fine.
In fact, it's what's done in the Scripting Archives here.
For example:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
objExcel.Cells(1, 1).Value = "Test value"

Notice that .Cells is application level. I suppose if you only
have one workbook open that maybe why it works.

I'll try the workbook.save method but I'd be suprised.

The problem is calling the DisplayAlers when running on a
Remote Desktop machine that is iconized.


And yes, the save has always popped up a Save confirmation or
SaveAs (search the excel programming for DisplayAlerts and you'll
see what I mean, it's not just this app.)

This is code that runs in the background, going to a shared workbook.
Maybe it's the "sharedness" that causes the dialog box. I'm not sure.

--
TIA
Paul Davidson



"Jim Rech" wrote:

Odd code. Firstly when you use Save there is no prompt unless the workbook
has never been saved in which case it's the same as SaveAs. In either case
it makes no sense to try to suppress an alert. Secondly, there is no
application level Save method. You save a workbook, not Excel. Maybe
objDE_Excel.ActiveWorkbook.Save is what you want.

--
Jim
"Paul Davidson" wrote in message
...
| (Posted this on scripting but recvd no answers, hopefully better luck this
| time.)
|
| I have a script that is run both locally and via remote desktop
| and accesses an xls file. The access is pretty simple.
| It finds a row and adds some text to various cells.
|
| We have no problems when run locally.
|
| However, when run via Remote Desktop, (and we believe when and
| only when the remote desktop is minimized or not active on any other
desktop)
| we get an error msg:
| "Not enough system resources to display completely."
|
| The failure is occuring somewhere in these lines:
|
| objDE_Excel.DisplayAlerts = vbFalse
| objDE_Excel.Save
| objDE_Excel.DisplayAlerts = vbTrue
|
| I'm 90% sure it's failing on the first line, the DisplayAlerts = vbFalse.
|
| I'm using this function because this is a shared workbook and without it,
| we continually get a SaveAs dialog box which requires interaction.
| Script needs to run automatically.
|
| Any ideas ?
|
| --
| Paul Davidson
|
|
| --
| TIA
| Paul Davidson
|



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
DisplayAlerts (Which Ones?) Klatuu Excel Programming 2 June 30th 05 02:09 PM
DisplayAlerts Howard Kaikow Excel Programming 12 April 29th 05 04:24 PM
Application.DisplayAlerts TK Excel Programming 4 April 7th 05 08:41 PM
Application.DisplayAlerts in IE scoobydeux Excel Programming 1 April 19th 04 01:28 AM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM


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