Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening properties box
Hi
Is there anyway of having the properties dialog box open up automatically when starting a blank spreadsheet? The box I refer to is accessed nomally from the File / Properties on the menubar. Thanks Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening properties box
Select Options in the Tools dropdown menu in the toolbar
at the top of the Excel window, in the Options dialog box that appears click in the check box by "Prompt for workbook properties". The way this works is, workbook properties actually only become properties after they have been entered and saved. So, MS has set this prompt to only appear when a new file is saved for the first time. This means that after setting this in the Options, when you open a new file save it immediately and the Properties dialog box will open automatically after you have typed in the name of the file and clicked on the Save button. I don't know how to show the Properties dialog box using VBA yet. -IA -----Original Message----- Hi Is there anyway of having the properties dialog box open up automatically when starting a blank spreadsheet? The box I refer to is accessed nomally from the File / Properties on the menubar. Thanks Steve . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening properties box
Steveb wrote:
Is there anyway of having the properties dialog box open up automatically when starting a blank spreadsheet? The code is easy: Application.Dialogs(xlDialogProperties).Show The question is how to make it run. You could put it in Workbook_Open in a workbook template BOOK.XLT in your XLSTART directory - but then you will get the macro virus warning when you create a new workbook. Also you would need to arrange for it only to run on first open If ThisWorkbook.Path = "" Then Application.Dialogs(xlDialogProperties).Show End If Better would be to make an application-level event handler in your PERSONAL.XLS detect a new workbook. In Personal.xls (or some other workbook in your XLSTART directory): - Insert / Class Module - name it clsApp (for example) - paste in this code: Public WithEvents oXL As Excel.Application Private Sub oXL_NewWorkbook(ByVal Wb As Excel.Workbook) If Wb.Path = "" Then Application.Dialogs(xlDialogProperties).Show End If End Sub - Insert / Module - paste in the following code: Dim clsXL As New clsApp Sub Auto_Open() Set clsXL.oXL = Application End Sub Sub Auto_Close() Set clsXL = Nothing End Sub - save the workbook - run Auto_Open - create a new workbook (to test it out). Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
graphics properties changes when opening Excel | Excel Discussion (Misc queries) | |||
using properties | Excel Discussion (Misc queries) | |||
Setting format properties when opening Worksheet | Excel Worksheet Functions | |||
REF errors when opening excel in xp. works fine when opening wor. | Excel Discussion (Misc queries) |