Excel file and Javascript

R

Robert Scheer

Hi.

One of the pages of my application opens an Excel 2000 workbook in a
new window using Javascript. The workbook is read only and I use a
window.open command to open the workbook. On the workbook's
BeforeClose event I have a code to avoid the 'Save' dialog: Me.Saved =
True

If I open the page locally, change some content and close the
workbook, the 'Save' dialog does not appear, as expected. As soon as I
open the workbook on the web, the 'Save' dialog still appears when I
close the window. I need to allow my users to change the contents of
the workbook but they cannot save the workbook. Is my approach wrong?
How can I avoid the 'Save' dialog?

Thanks,

Robert Scheer
 
R

Ray at

The me.saved (or thisworkbook.saved) property would have to be set for the
workbook itself and you'd put that in the Workbook_BeforeClose event, i.e.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub

But this is assuming that your client enables macros when launches your
workbook.

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top