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

I have created an web application which creates an Excel Workbook on a
server and then a link to the created workbook. If works fine on our
main web server however on local copies of the application , an out of
disc space error is appearing when creating the new workbook. Example
code is shown below.Class ExcelGen

Private objExcel
Private objWorkBook
Private objSheet
Private iColOffset
Private iRowOffset
Private strTmpdir
Private strFilename

Sub Class_Initialize()
rem On Error Resume Next


<%

iColOffset = 2
iRowOffset = 2

Set objExcel = CreateObject("excel.Application")
if (err.Number < 0) Then Exit Sub

objExcel.Visible = false
objExcel.DisplayAlerts = false

Set objWorkBook = objExcel.Workbooks.add -- Fails here
if (err.Number < 0) Then Exit Sub


The Excel object has been instanced as I can display the properties
Displayalerts and Visible

Any ideas !!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default VBA Excel.Application

Peter,

You can use
Set objWorkBook = New Excel.Workbook

HTH
Henry

"Peter Judson" wrote in message
om...
I have created an web application which creates an Excel Workbook on a
server and then a link to the created workbook. If works fine on our
main web server however on local copies of the application , an out of
disc space error is appearing when creating the new workbook. Example
code is shown below.Class ExcelGen

Private objExcel
Private objWorkBook
Private objSheet
Private iColOffset
Private iRowOffset
Private strTmpdir
Private strFilename

Sub Class_Initialize()
rem On Error Resume Next


<%

iColOffset = 2
iRowOffset = 2

Set objExcel = CreateObject("excel.Application")
if (err.Number < 0) Then Exit Sub

objExcel.Visible = false
objExcel.DisplayAlerts = false

Set objWorkBook = objExcel.Workbooks.add -- Fails here
if (err.Number < 0) Then Exit Sub


The Excel object has been instanced as I can display the properties
Displayalerts and Visible

Any ideas !!



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 VB application Neil Jones Excel Discussion (Misc queries) 4 April 30th 10 06:57 AM
Excel Application Jimmi79 Excel Discussion (Misc queries) 9 November 6th 07 01:50 PM
Application/vnd.ms-excel Henry R Excel Discussion (Misc queries) 0 January 22nd 06 02:32 AM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


All times are GMT +1. The time now is 02:15 PM.

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

About Us

"It's about Microsoft Excel"