Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with using the ActiveWindow property - sometimes
Hello,
I have a VB6 SP5 application with some code which copies page breaks from one sheet to another, and the first time I run it it works fine. If I try to run it again without closing and reopening the app I get a runtime error from this code: Application.ScreenUpdating = False If (ActiveWindow.View = xlNormalView) Then ActiveWindow.View = xlPageBreakPreview blResetView = True End If The message is that the "Object variable or With block variable not set" for 'ActiveWindow.View'. I have tried using the fully qualified reference 'Excel.Application.ActiveWindow.View' and I still get the same error. There is a reference set to the Excel 9 object library. I have tried this on Windows XP Pro and Windows 2000 Pro machines with the same result. Any help on this would be appreciated. Ragnar |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with using the ActiveWindow property - sometimes
I found the cause of the problem, it was the old problem with
Application.Quit not closing Excel. Still don't know how to get that to work though, so if anyone has found a way that works reliably I would appreciate hearing about it. Ragnar |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem using filter property | Excel Worksheet Functions | |||
ActiveWindow.SelectedSheets.PrintPreview | Excel Programming | |||
problem with resize property | Excel Programming | |||
Using ActiveWindow.PointsToScreenPixelsY | Excel Programming | |||
Problem with PrintArea property | Excel Programming |