B
Brad Stone
Hi there,
I'm using Excel 2003. I have a worksheet with a button on it that
does a PrintPreview. The button works fine in the Excel 2003
environment. But when a user loads my .XLS into Internet Explorer (I
assume IE automates Excel) the button fails and gives an error like:
Run-time error: 1004 Method 'PrintPreview' of object 'Sheets' failed
The code behind my button looks like:
ActiveWindow.SelectedSheets.PrintPreview
But I have also tried:
ThisWorkbook.Worksheets("Sheet1").Activate
ThisWorkbook.Worksheets("Sheet1").PrintPreview
They both work in the Excel 2003 environment but both fail if the .XLS
is run from Internet Explorer. My users really like using I.E. to open
XLS files in, so any workaround is creately appreciated!
Thanks,
Brad
I'm using Excel 2003. I have a worksheet with a button on it that
does a PrintPreview. The button works fine in the Excel 2003
environment. But when a user loads my .XLS into Internet Explorer (I
assume IE automates Excel) the button fails and gives an error like:
Run-time error: 1004 Method 'PrintPreview' of object 'Sheets' failed
The code behind my button looks like:
ActiveWindow.SelectedSheets.PrintPreview
But I have also tried:
ThisWorkbook.Worksheets("Sheet1").Activate
ThisWorkbook.Worksheets("Sheet1").PrintPreview
They both work in the Excel 2003 environment but both fail if the .XLS
is run from Internet Explorer. My users really like using I.E. to open
XLS files in, so any workaround is creately appreciated!
Thanks,
Brad