Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


Hi

I have a user form which has a First entry and which the user enters in
data after which they press ok and the data is insertedinto the
spreadsheet. however on the validation page which the user enters in
the same data i have some validation code which searchs the list of
data and then if a cell is not equal to what the user has entered it
brings up an input box with the two different figures and askes them to
choose.

All is working except that when it gets to the different data is keeps
on poping up asking which is correct and both figures with the input
box is showing is exactly the same. any ideas?

If ActiveCell.Offset(0, -11).Value < CJ_val Then
answer = InputBox("Which answer is correct for CJ Hours? A: "
& ActiveCell.Offset(0, -11).Value & " or B: " & CJ_val & ". Please type
A or B and press OK.")
If answer = "B" Or answer = "b" Then
ActiveCell.Offset(0, -11).Value = CJ_val.Value
End If
End If

The above code the validation part. say the user first entered in 1 (As
the user only has to enter in 1-10 and thats it, and the second time
they enter it in as 1 it comes up asking if the right answer is 1 or 1?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=380024

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


probably one of them is being treated as text, while the other as a
number...


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380024

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


how do i check

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


what is cj_val
for the cell, just check in another cell, if
=ISTEXT(A1) should return true for text and false for number

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


ok the activecell.offsets are numbers. cj_val is the name of th
textbox. how do i do a check on the textbox

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38002



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


Try CJ_val.Value

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


just above the code i put in the below

Range("ak15").Value = "=istext(cj_val.value)"

it result was that it was a number as well.

any ideas? how i could achieve the same result with a different
method.?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=380024

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


No, I meant try:

If ActiveCell.Offset(0, -11).Value < CJ_val.Value Then


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380024

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


I tried that and still no luck

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


When both return 1,

IsNumeric(ActiveCell.Offset(0, -11).Value)
and
IsNumeric(CJ_val.Value)

should return true.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=380024



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


WHERE must i put this code

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with validation


I figured the problem out what i needed to do as put cj_hours.value /
to make sure it was a number now it works.

Thanks for you assistanc

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=38002

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation trouble Bbongo8 Excel Programming 1 January 8th 12 02:10 PM
Trouble With Data Validation And Filtering On A Dropdown zura04 Excel Worksheet Functions 0 October 24th 06 08:58 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"