Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default 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
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
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
graphics properties changes when opening Excel Zebcougar Excel Discussion (Misc queries) 1 October 19th 09 06:59 AM
using properties Mrs. Smith Excel Discussion (Misc queries) 1 June 4th 07 05:37 PM
Setting format properties when opening Worksheet Don Excel Worksheet Functions 1 December 12th 06 10:27 AM
REF errors when opening excel in xp. works fine when opening wor. br Excel Discussion (Misc queries) 6 September 13th 05 11:41 AM


All times are GMT +1. The time now is 07:31 AM.

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

About Us

"It's about Microsoft Excel"