Guus2005
AWF VIP
- Local time
- Today, 20:09
- Joined
- Jun 26, 2007
- Messages
- 2,642
Windows 8, Office 2013, 32 bits
My code gives an error on the ".Add" line. Can't figure out why.
The error is 1004. Which doesn't give me any information. Unfortunately.
Anyone?
My code gives an error on the ".Add" line. Can't figure out why.
The error is 1004. Which doesn't give me any information. Unfortunately.
Anyone?
Code:
Public Sub GegevensValidatieAantalUrenMaand(ByVal rngTarget As Range)
'
' GegevensValidatieAantalUrenMaand Macro
'
With rngTarget.Validation
.Delete
.Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="0", Formula2:="99999999,99"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Aantal onjuist"
.InputMessage = ""
.ErrorMessage = "Geef een correcte waarde voor het aantal uren in met 2 decimalen achter de komma (bijvoorbeeld: 48,50)"
.ShowInput = True
.ShowError = True
End With
End Sub