Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run-time error '91'
Hi,
I have an Excel workbook that works fine when opening in an Excel window. This workbook needs to sit on our intranet though. When opening it opens in an Internet Explorer Window. The file works ok except that the following code which is attached to a button on a form: Private Sub FelipeButton32_Click() ActiveSheet.PageSetup.PrintArea = "$AA$13:$Ad$16" ActiveWindow.SelectedSheets.PrintOut Copies:=1, collate:=True ActiveSheet.PageSetup.PrintArea = "$B$2:$k$175" End Sub Causes: Run-Time error '91' - Object variable or With block variable not set. Yet the routine doesn't cause the problem when opened in Excel normally. Can anyone tell me why at all? Thanks Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
run time error 1004 general odbc error excel 2003 vba | Excel Programming | |||
Error handling error # 1004 Run-time error | Excel Programming | |||
Run Time 1004 Error: Application or Object Difine Error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |