1 time data entry
Solved/Closed
ArashMan
Posts
38
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
-
Jan 14, 2015 at 01:12 AM
ArashMan Posts 38 Registration date Monday December 15, 2014 Status Member Last seen February 18, 2015 - Jan 23, 2015 at 11:16 PM
ArashMan Posts 38 Registration date Monday December 15, 2014 Status Member Last seen February 18, 2015 - Jan 23, 2015 at 11:16 PM
Related:
- 1 time data entry
- Fnaf 1 download pc - Download - Horror
- Tentacle locker 1 - Download - Adult games
- Popcorn time download - Download - Movies, series and TV
- Fnia 1 - Download - Adult games
- Igi 1 download - Download - Shooters
3 responses
Paste this into the VBA for the worksheet:
The field being checked in this case is B2. Change it to suit your requirements.
If the field is blank entry is allowed otherwise a message is produced and the original value is put back into the cell.
The field being checked in this case is B2. Change it to suit your requirements.
If the field is blank entry is allowed otherwise a message is produced and the original value is put back into the cell.
Dim oldvalue
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B2")) Is Nothing Then Exit Sub
oldvalue = Target
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("B2"), Target) Is Nothing Then Exit Sub
If oldvalue <> Target And oldvalue <> VbEmptyValue Then
MsgBox ("Cannot change this value")
Target = oldvalue
End If
End Sub
ArashMan
Posts
38
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
1
Jan 15, 2015 at 12:20 AM
Jan 15, 2015 at 12:20 AM
I don't get that error, I am using and .xlsx not .xls
However, replace this line (vbEmptyValue is not a valid constant):
If oldvalue <> Target And oldvalue <> VbEmptyValue Then
with this:
If oldvalue <> Target And oldvalue <> vbNullString Then
This also works for me.
However, replace this line (vbEmptyValue is not a valid constant):
If oldvalue <> Target And oldvalue <> VbEmptyValue Then
with this:
If oldvalue <> Target And oldvalue <> vbNullString Then
This also works for me.
ArashMan
Posts
38
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
1
Jan 18, 2015 at 06:58 AM
Jan 18, 2015 at 06:58 AM
i revived same error in that line again.
thanks anyway
thanks anyway
ArashMan
Posts
38
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
1
Jan 18, 2015 at 11:16 PM
Jan 18, 2015 at 11:16 PM
i removed the merged cell but i still have the same error
i will appreciate if you can give me sample file.
thanks
i will appreciate if you can give me sample file.
thanks
ArashMan
Posts
38
Registration date
Monday December 15, 2014
Status
Member
Last seen
February 18, 2015
1
>
RayH
Jan 19, 2015 at 11:13 PM
Jan 19, 2015 at 11:13 PM
ok sure the files password is "test"
https://upload7.ir/404/vfont/not.html
https://upload7.ir/404/vfont/not.html
Jan 15, 2015 at 12:18 AM
i receive this errors(attached pictures) please help me