Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Data Validation Error

Hi,

As part of the functionality of a workbook I'm developing, a macro adds a
new data line to a page. One of the cells is validated from a drop-down list:

' Risk Categorisation data validation

FormatRange = "j" & RiskCount + 5
Range(FormatRange).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween,
Formula1:="="Assumption,Commercial,Communications, Corporate/Strategic,Dependency,Economic/financial/market,Environmental/Force
Majeure,Governance,Organisational management/human
factors,Political/societal,Quality,Requirements,Schedule,Security,Te chnical -
Operational,Technical - Infrastructure,Technical - Software,Testing,3rd Party
- Customer,3rd Party - Supplier"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With

When I run the macro that inserts new line it works perfectly, including the
data validation. However, after saving and exiting the workbook, when I
re-open it I get an error message:

"Excel found unreadable content <workbook name here do you want to recover
the contents of this workbook?"

This offers me a yes/no option. If I select yes, the workbook continues to
open but the validation is lost. This runs before a Workbook_Open function.

After the Workbook_Open function has completed, the following message is
displayed:

"Removed Featu Data validation from /xl/worksheets/sheet4.xml part"

This has a link to an error log that basically tells me that the validation
has been removed.

Can anyone tell me:
1) What is happening?
2) How do I fix it (I've only just added the validation values. Previously
I had a holding statement to the effect of "Insert validation values here"
which worked fine)

This is under Vista on XL '07 if that makes any difference.

TIA

Dave
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
Data Validation Error CH Excel Discussion (Misc queries) 1 January 26th 10 07:59 PM
Data Validation error Kristen Excel Discussion (Misc queries) 2 February 7th 08 02:36 PM
#VALUE# error with Data Validation KG Excel Discussion (Misc queries) 1 May 28th 05 05:31 AM
Data Validation Error! Soniya Excel Programming 0 August 19th 03 08:31 AM
error with data validation Claude Excel Programming 1 July 21st 03 11:02 AM


All times are GMT +1. The time now is 08:24 PM.

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"