Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Validate WorkBook name

I want to use the "Before Save" event to force users to save a template with
a certain naming convention. (The name must contain the words Air
Container)

Is this possible. For example in the Before Save event procedure it may say
something like

If WorkBook.Name < "*Air Container*" (if true then it would prevent the
save from completing.)

Thanks in advance
AD108


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Validate WorkBook name

Bob Philips gave me an excellent solution to a similar problem. See thread
"SaveAs with a pre-defined filename" in this group!

Regards,
Stefi


€žAD108€ ezt Ã*rta:

I want to use the "Before Save" event to force users to save a template with
a certain naming convention. (The name must contain the words Air
Container)

Is this possible. For example in the Before Save event procedure it may say
something like

If WorkBook.Name < "*Air Container*" (if true then it would prevent the
save from completing.)

Thanks in advance
AD108



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Validate WorkBook name

On Tue, 27 Jun 2006 20:08:17 -1000, AD108 wrote:

I want to use the "Before Save" event to force users to save a template with
a certain naming convention. (The name must contain the words Air
Container)


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Not (ThisWorkbook.Name Like "*Air Container*") Then Cancel = True
End Sub

--
PL
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Validate WorkBook name

Thanks alot


"Piotr Lipski" wrote in
message ...
On Tue, 27 Jun 2006 20:08:17 -1000, AD108 wrote:

I want to use the "Before Save" event to force users to save a template

with
a certain naming convention. (The name must contain the words Air
Container)


Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If Not (ThisWorkbook.Name Like "*Air Container*") Then Cancel = True
End Sub

--
PL



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
validate wAYNE Excel Discussion (Misc queries) 1 March 1st 10 06:21 PM
Looking up a name and then being able to validate it twynsys Excel Worksheet Functions 0 November 29th 06 02:48 PM
How to validate list data from a different workbook Tim Excel Discussion (Misc queries) 2 August 17th 06 02:00 PM
Validate Workbook Name AD108 Excel Programming 1 June 27th 06 09:39 PM
Validate non-blank fields in Excel workbook cboyko Excel Programming 0 April 12th 06 06:52 PM


All times are GMT +1. The time now is 05:12 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"