LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Problems entering Data validation Programatically

I have one code that uses the change event to add validation boxes to any row
that doesn't have them.

I have another code to insert a special row, that has special validation
boxes(apart from the change event). My change event has a variable that stops
the change event from running while it's in process.

The problem is that when I activate the cahnge event, the validation runs
smoothly and is inserted into the sheet, using named ranges from another
sheet as the values for the drop down box. When I try to insert the special
row, and I use the exact same code to add the validation, it errors on the
add line:

With ActiveSheet.Range(Cells(iRow, iColumn).Address).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=sRange

As you can see, I delete the current validation so that I can always use an
add routine. When I set a watch VBA sees the validation, but won't run the
line. I have tried removing all variables and tired not referring to a anmed
range and still get the error. I am using Excel 2000. Any ideas on why the
code will work in one procedure but not in another?

*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

 
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
Problems entering data in exel spreadsheet OneNightWithTheKing Excel Worksheet Functions 3 February 19th 10 09:44 PM
Data validation causing problems when using a data form in Excel 2 Peter Excel Worksheet Functions 1 November 27th 09 12:00 AM
Data validation problems changetires Excel Worksheet Functions 0 August 16th 06 02:30 AM
Data Validation lists - entering value not in list rgarber50 Excel Discussion (Misc queries) 3 July 19th 05 08:35 PM
Programatically Entering an Array Formula John C.[_4_] Excel Programming 1 July 28th 04 01:53 AM


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