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

What would be a good method to validate the name a workbook is saved as.
For example, I want to force the user to save a template workbook with the
words "*Air Container*" included in the name. Note the wildcards, as each
file will have a seperate name, but must include the words Air Container.

Thanks in advance.

AD108


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Validate Workbook Name

See Rob Bovey's post here.

http://groups.google.com/group/micro...9a9 e56275300

You could modify his code a bit like this

If szFile < "False" Then
If UCase(szFile) Like UCase("*Air Container*") Then
''' Do your processing here.
Else
MsgBox "Bad Filename!", vbCritical, "Error"
End If
End If

to check if the file name is like "*Air Container*".

Mark


AD108 wrote:
What would be a good method to validate the name a workbook is saved as.
For example, I want to force the user to save a template workbook with the
words "*Air Container*" included in the name. Note the wildcards, as each
file will have a seperate name, but must include the words Air Container.

Thanks in advance.

AD108


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
validate kyoshirou Excel Discussion (Misc queries) 18 June 6th 07 01:08 AM
How to validate list data from a different workbook Tim Excel Discussion (Misc queries) 2 August 17th 06 02:00 PM
How to validate edwardpestian Excel Worksheet Functions 4 June 9th 06 01:13 AM
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 02:13 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"