Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ben,
I have a routine which adds a new row at row3 for addition of new data. The routine includes the code listed below but has no effect. I even clicked "Data"/"Validation"etc. and applied the settings manually. They work for the row in question until the routine is run and then they move with the row of data to row4. The routine specifies row3 after the new row has been added so it should work but doesn't. Do you have a solution for this dilemma? Thanks, Jim -- Pops Jackson "ben" wrote: Columns("A:A").Select With Selection.Validation .Delete .Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="00", Formula2:="55" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With this add validation to column "A" for a whole number from 00 to 55. you can edit any of the variable. This was created using the macro recorder. Try using that to get the exact validation you need, that way you can see proper Syntax -- When you lose your mind, you free your life. "Joe" wrote: Hi, I would like to know if I can "call in" data validation using a macro. I have a list in a certain worksheet, say Sheet "my list", and I want to add data validation to Column A in another sheet "status". I tried doing this manually, but then, when I run my parent macro for the project, I have the "Clearcontents" option in that (so that when the macro is run, it wont print out results for the previous run), and that seems to remove the data validation property in Col A. Can anyone help me with this? (I searched online, but most of the stuff I found is either out of context, or too abstruse for me - I'm a novice in VB programming, but am learning fast) Thanks a lot, Joe. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xls data validation question 2 | Excel Discussion (Misc queries) | |||
Data Validation Question | Excel Discussion (Misc queries) | |||
Data Validation question | Excel Discussion (Misc queries) | |||
Data Validation Question? | Excel Worksheet Functions | |||
Another Data Validation question | Excel Discussion (Misc queries) |