G
Guest
Oh. . . o.K. I can do that, now I want to have the same code in each
worksheet of the workbook,correct? i.e. I already have the date code you
provided in there and have tried eliminating the end sub between them, seems
it does not want to work this way.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Macro will add Validation to a Dropdown list to any blank selected cell in
Column E
ActiveCell.Select
If ActiveCell.Column = 4 Then 'Limits macro action to column D
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
ActiveCell.Select
With Selection.Validation
.Delete
.Add Type:=xl ValidateList, AlertStyle:=xlValidAlertStop,
Operator:= xl Between , Formula1:="=$E$1:$E$50" 'E1:E50 is location of
the list
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Else
End If
Else
End If
End Sub
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column C when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 3 Then 'Limits macro action to column C
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
End If
Else
End If
End Sub
I have been looking to learn more about this and have found some info about
this and found some info in "CONTEXTURES" web sight dealing with dynamic
lists that will update whenever something is added. Ilike that feature and am
also trying to figure this one out. I'll get eventually!
worksheet of the workbook,correct? i.e. I already have the date code you
provided in there and have tried eliminating the end sub between them, seems
it does not want to work this way.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Macro will add Validation to a Dropdown list to any blank selected cell in
Column E
ActiveCell.Select
If ActiveCell.Column = 4 Then 'Limits macro action to column D
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
ActiveCell.Select
With Selection.Validation
.Delete
.Add Type:=xl ValidateList, AlertStyle:=xlValidAlertStop,
Operator:= xl Between , Formula1:="=$E$1:$E$50" 'E1:E50 is location of
the list
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Else
End If
Else
End If
End Sub
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Automatically inserts today's date in cell in column C when selected
'if the cell was empty. Does not overwrite occupied cell.
If ActiveCell.Column = 3 Then 'Limits macro action to column C
If ActiveCell.Value = "" Then 'Check to see if Target cell empty
Selection.Value = Date 'Insert today's date in Target cell
End If
Else
End If
End Sub
I have been looking to learn more about this and have found some info about
this and found some info in "CONTEXTURES" web sight dealing with dynamic
lists that will update whenever something is added. Ilike that feature and am
also trying to figure this one out. I'll get eventually!