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: 36
Default Problem with validation deletion/modification

Hi, sheet1 col A is filled with values, I want col B to have a validation
based on a named range on sheet2. The problem, # the number of rows that
have validaton in sheet1!col b should change based on how many rows have
values in col a, also, the actual list will change due to changes to the
named range. I thought of deleting the validation and recreating every time
the macro runs. Also, the code below added it, then I wrote some code to
delete it and now code that added it befare no longer does, why?

On Error Resume Next
ThisWorkbook.Names("temp").Delete
test = "$A$5:$A$" & intUniqueTrDesc + 4
Sheets(RT).Range(test).Name = "temp"

With Range(Cells(StartRow, pbeydescchg), Cells(intNumOfTrDesc + HdrRow,
pbeydescchg)).Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=Temp"

.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True

End With
On Error GoTo 0

 
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 w/o Cell Content Deletion BJ Excel Worksheet Functions 1 September 16th 08 09:43 PM
Problem with Validation deleton/modification? mikeb Excel Programming 0 November 8th 06 08:21 PM
Problem with Conditional format deletion [email protected] Excel Discussion (Misc queries) 3 December 13th 04 05:10 PM
Excel Problem in detail/updation, deletion programmer_int[_4_] Excel Programming 1 September 4th 04 09:56 PM
Excel VBA - Userform updation/deletion problem programmer_int[_3_] Excel Programming 1 September 4th 04 09:12 PM


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

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"