Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Greying out the OK button

I have a form that my users fill out. I want the OK button greyed out
until they fill out the form perfectly. At this point, I have
simplified it down to the following:

Private Sub UserForm_Activate()
btnOK.Enabled = False
End Sub

Private Sub txtEnd_AfterUpdate()
If Not IsNull(txtStart) And Not IsNull(txtEnd) Then
btnOK.Enabled = True
End If
End Sub

The problem is the OK button disables fine, but it never enables. When
I step through the code, it enables. Its like the code doesn't have
enough time to "darken in" the OK button, so it skips it unless the
slow human is doing the processing.

What I am doing wrong?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Greying out the OK button

I tested out your code as written and it worked fine for me. Excel 2000 on
Win 2000.
--
- K Dales


"Jeff M" wrote:

I have a form that my users fill out. I want the OK button greyed out
until they fill out the form perfectly. At this point, I have
simplified it down to the following:

Private Sub UserForm_Activate()
btnOK.Enabled = False
End Sub

Private Sub txtEnd_AfterUpdate()
If Not IsNull(txtStart) And Not IsNull(txtEnd) Then
btnOK.Enabled = True
End If
End Sub

The problem is the OK button disables fine, but it never enables. When
I step through the code, it enables. Its like the code doesn't have
enough time to "darken in" the OK button, so it skips it unless the
slow human is doing the processing.

What I am doing wrong?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Greying out the OK button

Hmmmm. I have Excel 2000 on W2K as well. I just checked and I have
Office 2000 original issue (never been patched). I think I'll patch it
and try again.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Greying out the OK button

Well, I patched Office and Windows and still no go.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Greying out the OK button

I can't explain your problem, but your next problem will be with using
ISNULL.


? isnull("AA")
False
? isnull("")
False

It will always return false unless you have a true NULL (not empty string)
in the cell.



--
Regards,
Tom Ogilvy



"Jeff M" wrote in message
oups.com...
Hmmmm. I have Excel 2000 on W2K as well. I just checked and I have
Office 2000 original issue (never been patched). I think I'll patch it
and try again.





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
Greying out text Rich Excel Discussion (Misc queries) 2 September 5th 08 06:15 PM
Greying out or locking certain columns Jen Excel Discussion (Misc queries) 0 February 22nd 08 06:02 PM
greying-out item on custom popup? Matthew Dodds Excel Programming 2 February 2nd 05 01:06 PM
Greying out cells Tom Ogilvy Excel Programming 0 December 4th 03 04:48 PM
Greying out cells Den Excel Programming 0 December 4th 03 04:37 PM


All times are GMT +1. The time now is 11:33 PM.

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

About Us

"It's about Microsoft Excel"