LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Advice Please?

Hi all,

I have this code below it is working well apart from the inputboxes, I want
the person to have the ability to hit the cancel button. when this happens
now it fills the column "g" completely with yes
how can this be corrected.

Private Sub UserForm_Activate()
Sheet5.Activate
Label1.Caption = InputBox("WHAT IS THE PLAYER'S REGISTRATION NUMBER?",
"Existing Player's re-registration")

Dim Nor
Dim ans

On Error Resume Next

ans = Application.Match(CLng(Label1.Caption), Range("A:A"), 0)
If Not IsError(ans) Then
Label2.Caption = Application.Index(Range("B:B"), ans)
Label3.Caption = Application.Index(Range("c:c"), ans)
Application.Index(Range("j:j"), ans) = "YES"

Else
MsgBox "Invalid code"
End If
On Error GoTo 0
Nor = MsgBox("IS THIS THE RIGHT PERSON?", vbYesNo)

If Nor = vbNo Then
Label1.Caption = InputBox("WHAT IS THE PLAYER'S REGISTRATION NUMBER?",
"Existing Player's re-registration")

Exit Sub
End If

If Nor = vbYes Then
Unload Me
QUESTION1.Show
End If

End Sub

Thanks

greg


 
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
Need advice Form maker Excel Worksheet Functions 1 December 2nd 06 04:26 PM
advice. Osvaldo[_2_] Excel Programming 1 July 24th 05 12:42 AM
RTD Advice JD Excel Programming 2 October 22nd 04 11:29 AM
In need of advice? onedaywhen Excel Programming 6 June 7th 04 02:22 PM
please advice Waleed Hanafy Excel Programming 1 April 15th 04 02:50 PM


All times are GMT +1. The time now is 04:21 AM.

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"