Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't if I am blind or just can't see. Something has happened and the
valadtrion is not acting as it did. I moved the paste to see if that was it get error ..Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I'd try deleting any existing Data|Validation rules.
With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if I understand correctly this would inform user that entry is over 232 and
then delete entry. I will do as suggested if this is the way it works I am ok with it. Thanks Much "Dave Peterson" wrote: I think I'd try deleting any existing Data|Validation rules. With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No.
It won't delete the cell (or clear the contents of the cell). It'll delete any existing data|validation rules for that cell. Curt wrote: if I understand correctly this would inform user that entry is over 232 and then delete entry. I will do as suggested if this is the way it works I am ok with it. Thanks Much "Dave Peterson" wrote: I think I'd try deleting any existing Data|Validation rules. With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I put in the .Delete as suggested still had same reaction. If I (') out all
validation no error. Would like to stop entry error by user. If to long do not allow entry. Do not understand why this quit working as it was ok. Did not get error befor. Trying to limit so announcer will not have to much to read. This is a BONO program. To help Veterans Day Parade. Sometimes it is nice to know what its for FYI. Also I have noticed a large difference in font area. Up to 30 space difference in same font size. Example D= 198 E =228 wqithin same area. Am I missing something or is this normal Thanks for your assistance. "Dave Peterson" wrote: No. It won't delete the cell (or clear the contents of the cell). It'll delete any existing data|validation rules for that cell. Curt wrote: if I understand correctly this would inform user that entry is over 232 and then delete entry. I will do as suggested if this is the way it works I am ok with it. Thanks Much "Dave Peterson" wrote: I think I'd try deleting any existing Data|Validation rules. With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry.
I don't have another guess. Maybe you could drop the whole code and put a warning in an adjacent cell: =if(len(a1)<=232,"","This is a long comment!" Curt wrote: I put in the .Delete as suggested still had same reaction. If I (') out all validation no error. Would like to stop entry error by user. If to long do not allow entry. Do not understand why this quit working as it was ok. Did not get error befor. Trying to limit so announcer will not have to much to read. This is a BONO program. To help Veterans Day Parade. Sometimes it is nice to know what its for FYI. Also I have noticed a large difference in font area. Up to 30 space difference in same font size. Example D= 198 E =228 wqithin same area. Am I missing something or is this normal Thanks for your assistance. "Dave Peterson" wrote: No. It won't delete the cell (or clear the contents of the cell). It'll delete any existing data|validation rules for that cell. Curt wrote: if I understand correctly this would inform user that entry is over 232 and then delete entry. I will do as suggested if this is the way it works I am ok with it. Thanks Much "Dave Peterson" wrote: I think I'd try deleting any existing Data|Validation rules. With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
will take a different approach
Thanks much for input "Dave Peterson" wrote: Sorry. I don't have another guess. Maybe you could drop the whole code and put a warning in an adjacent cell: =if(len(a1)<=232,"","This is a long comment!" Curt wrote: I put in the .Delete as suggested still had same reaction. If I (') out all validation no error. Would like to stop entry error by user. If to long do not allow entry. Do not understand why this quit working as it was ok. Did not get error befor. Trying to limit so announcer will not have to much to read. This is a BONO program. To help Veterans Day Parade. Sometimes it is nice to know what its for FYI. Also I have noticed a large difference in font area. Up to 30 space difference in same font size. Example D= 198 E =228 wqithin same area. Am I missing something or is this normal Thanks for your assistance. "Dave Peterson" wrote: No. It won't delete the cell (or clear the contents of the cell). It'll delete any existing data|validation rules for that cell. Curt wrote: if I understand correctly this would inform user that entry is over 232 and then delete entry. I will do as suggested if this is the way it works I am ok with it. Thanks Much "Dave Peterson" wrote: I think I'd try deleting any existing Data|Validation rules. With Selection.Validation .Delete '<-- added .... Curt wrote: Don't if I am blind or just can't see. Something has happened and the valadtrion is not acting as it did. I moved the paste to see if that was it get error .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" this line is yellowed out on debug. will enclose complete module. Have left in my changes till I get it right. You can see the('). Thanks in Advance heres the procedure Option Explicit Dim cellLength As Integer 'Puts descripition into cell shrink to fit cell Sub active_offset() Worksheets("desc").Select Range("A2").Select cellLength = Len(ActiveCell) If msgbox(cellLength & vbNewLine & "If Number above over 232 click Yes As will not show in print out", _ vbYesNo) = vbYes Then Exit Sub Else Dim Data As Worksheet Range("a2").Select Selection.Copy Sheets("Data").Select 'ActiveSheet.Paste With Selection.Validation .Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _ Operator:=xlLessEqual, Formula1:="232" .IgnoreBlank = False .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With ActiveSheet.Paste ' Range("B2").Select End If Worksheets("Desc").Select Range("A2").Select Selection.ClearContents Worksheets("Data").Select Range("A4").Select ' End If End Sub -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Valadation | Excel Worksheet Functions | |||
valadation list | New Users to Excel | |||
Data Valadation | Excel Discussion (Misc queries) | |||
Data Valadation - | Excel Worksheet Functions | |||
Data Valadation help | Excel Worksheet Functions |