Thread: Form VBA
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 172
Default Form VBA

correct me if i am wrong but you have OpenPS001F to be Visible = FALSE if
Mycell < 50???

"Mark J" wrote in message
...
cell value is less than 50, so why does the code not fire?

"William Horton" wrote:

I assume you have double checked that MyCell contains a value that is
greater
than 50...

"Mark J" wrote:

I have the following code:
Private Sub UserForm_Activate()
Me.OpenPS001.Visible = False
Me.OpenPS001F.Visible = False
MyCell = Worksheets("PS001").Range("d9")
If MyCell 50 Then
Me.OpenPS001.Visible = False
Me.OpenPS001F.Visible = True
Else
If MyCell < 50 Then
Me.OpenPS001F.Visible = False <=========== Change to True
Me.OpenPS001.Visible = True
End If
End If
End Sub

on open, OpenPS001F should appear , but does not, any ideas?