Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Why is my Workbook Open procedure not working

I have put a workbook open procedure in my model on the 'This Workbook' sheet.

Public Sub WorkBook_Open()

AnalysisToolPak_Exists 'Procedure to ensure Analysis toolpak is operational
'Maximize worksheet to calculate dimensions
Application.WindowState = xlMaximized
Application.ScreenUpdating = False
TaskBar_Hide 'Procedure to hide taskbar
Application.DisplayFullScreen = True
With Application
.Calculation = xlAutomatic
.Iteration = True
.MaxIterations = 50
.MaxChange = 0.001
End With
Application.ScreenUpdating = True
ActiveWorkbook.PrecisionAsDisplayed = False
Health_warningfrm.Show 'Calls "Splash" screen to warn users of model limitations

Load Mainscreen
Mainscreen.Show

End Sub

My problem is that it will not run when the workbook is opening. It can be run from within Excel via Tools Macro Run. It did run at an earlier stage in the devlopment process of the model. Latterly it ran occasionally, but now it seems it never works.

I am running Excel 2002, though it was originally developed in Excel 2000.

Anyone any ideas as to what maybe wrong.

--
TIA
Ron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Why is my Workbook Open procedure not working

Hi
some ideas:
- check that you really have put this code in your
workbook module
- check if application events are enabled. e.g. enter the
following line in the immediate Window:
applicationenableevents=true
and try again

-----Original Message-----
I have put a workbook open procedure in my model on

the 'This Workbook' sheet.

Public Sub WorkBook_Open()

AnalysisToolPak_Exists 'Procedure to ensure Analysis

toolpak is operational
'Maximize worksheet to calculate dimensions
Application.WindowState = xlMaximized
Application.ScreenUpdating = False
TaskBar_Hide 'Procedure to hide taskbar
Application.DisplayFullScreen = True
With Application
.Calculation = xlAutomatic
.Iteration = True
.MaxIterations = 50
.MaxChange = 0.001
End With
Application.ScreenUpdating = True
ActiveWorkbook.PrecisionAsDisplayed = False
Health_warningfrm.Show 'Calls "Splash" screen to

warn users of model limitations

Load Mainscreen
Mainscreen.Show

End Sub

My problem is that it will not run when the workbook is

opening. It can be run from within Excel via Tools Macro
Run. It did run at an earlier stage in the devlopment
process of the model. Latterly it ran occasionally, but
now it seems it never works.

I am running Excel 2002, though it was originally

developed in Excel 2000.

Anyone any ideas as to what maybe wrong.

--
TIA
Ron
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass Auto-Open Procedure QB Excel Discussion (Misc queries) 1 October 6th 09 04:29 PM
programmatically open VBE and go to a specified procedure in target module? DataFreakFromUtah Excel Programming 4 July 12th 04 05:37 PM
My syntax not working with Auto Open procedure Graham[_5_] Excel Programming 2 April 1st 04 05:08 PM
Workbook.Open Event Procedure not firing Gordon Rodman Excel Programming 1 October 17th 03 05:03 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"