Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: Kavita Jaiswal
  Where is Kavita Jaiswal?
 Calcutta
 India
 Kavita Jaiswal
 Tags
Subject: RE: Excel Automation
Thread ID: 189261 Message ID: 189267 # Views: 5 # Ratings: 0
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Thursday, August 14, 2008 7:42:21 AM         
   


> Hi all,
>
> Can anyone help me out that how can I always close an Excel Sheet promting "Save as" instead of "Save" dialog box ,as I don't want the user to use the Template Excel Sheet.

Again the answer is eventhandler
I think you was able to bind events to excel in your previous thread, right?

then you can put this code in the same procedure:
oExcel.DisplayAlerts = .F.
PROCEDURE AppEvents_WorkbookBeforeClose(Wb AS VARIANT, Cancel AS LOGICAL @) AS VOID
	 TRY 
   	   m.oworkbook.SaveAs(PUTFILE("Save As","yourFileName","xls"))
   	 CATCH TO oErr
   	 ENDTRY   
	 *=sendMessage()


>
> Beside the above problem how can i protect a given cell range, instead the entire sheet in an Excel sheet.
>

I have answered this question in some other thread posted by "M M".
check this thread
Message ID: 188275


>
> Cheers
> Kavita



-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email: sur200@indiatimes.com
Check my blog for details: http://weblogs.foxite.com/sur200
----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.

ENTIRE THREAD

Excel Automation Posted by KAVITA JAISWAL @ 8/14/2008 7:17:46 AM
RE: Excel Automation Posted by surinder singh @ 8/14/2008 7:42:21 AM
RE: Excel Automation Posted by Cetin Basoz @ 8/14/2008 1:07:38 PM
RE: Excel Automation Posted by Yousfi Benameur @ 8/14/2008 10:02:00 PM