View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cliodne[_13_] cliodne[_13_] is offline
external usenet poster
 
Posts: 1
Default Selecting a specific cell (that is data validated)


Okay, sorry, I'll try to explain my problem better. The following is my
code currently.


Code:
--------------------
Private Sub Worksheet_Activate()
'
'
Dim A As Variant
Dim B As Variant
Dim C As Variant
Dim D As Variant
'
Range("D8").Select
A = ActiveCell.Value
Range("C33").Select
C = ActiveCell.Value
'
Sheets("Revenue").Select
Range("D8").Select
B = ActiveCell.Value
Range("C33").Select
D = ActiveCell.Value
'
'
If A < B Or C < D Then
MsgBox "Please make sure that the currency choice and percentage of attendance are uniform for all sheets before viewing this page. Thank you."
End If
'
'
End Sub

--------------------


The ranges selected are cells that when you click on them, they drop
down a list of choices (data validation set to the list option), so I'm
trying to get the code to read what exact value it's on at the moment,
but when I step through the code, I get an error saying: Run-time error '1004': Application-defined or object-defined error. So I changed my variables to variant to cover everything, but still
the problem. When I do the direct A = Range("D8"), A doesn't pick up
anything and is set at "nothing"

I hope this is clearer,
Cami


--
cliodne
------------------------------------------------------------------------
cliodne's Profile: http://www.excelforum.com/member.php...o&userid=28774
View this thread: http://www.excelforum.com/showthread...hreadid=534873