Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Moh Moh is offline
external usenet poster
 
Posts: 58
Default code not working

why does this code not work? ? ? or what have i missed out??

Private Sub CommandButton3_Click()
If Me.TextBox1.Value = 74987 Then
Worksheets("Bank View1").Activate
Unload Me
Else
MsgBox "Wrong Password Please check Password and Try again"
Me.TextBox1 = ""
Sheets("Instructions").Select
End Sub
--

just a early thank you whoever can help ???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default code not working

Hi Moh

Your code seems to be missing the "end if" just before the end sub to
close the if statement.

Hope this helps

Steve

  #3   Report Post  
Posted to microsoft.public.excel.programming
Moh Moh is offline
external usenet poster
 
Posts: 58
Default code not working

thank you steve

this worked for me




"Incidental" wrote:

Hi Moh

Your code seems to be missing the "end if" just before the end sub to
close the if statement.

Hope this helps

Steve


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default code not working

Does not work? What does it do, trash your PC, disappear up its own ...

There is a misusing End if at the end, but the compiler would tell you that,
so some detail would help.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Moh" wrote in message
...
why does this code not work? ? ? or what have i missed out??

Private Sub CommandButton3_Click()
If Me.TextBox1.Value = 74987 Then
Worksheets("Bank View1").Activate
Unload Me
Else
MsgBox "Wrong Password Please check Password and Try again"
Me.TextBox1 = ""
Sheets("Instructions").Select
End Sub
--

just a early thank you whoever can help ???



  #5   Report Post  
Posted to microsoft.public.excel.programming
Moh Moh is offline
external usenet poster
 
Posts: 58
Default code not working

you are one funny comedian errrrm not

anyway thank you for the help

much appreciated.

Cheers Ears
--



"Bob Phillips" wrote:

Does not work? What does it do, trash your PC, disappear up its own ...

There is a misusing End if at the end, but the compiler would tell you that,
so some detail would help.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Moh" wrote in message
...
why does this code not work? ? ? or what have i missed out??

Private Sub CommandButton3_Click()
If Me.TextBox1.Value = 74987 Then
Worksheets("Bank View1").Activate
Unload Me
Else
MsgBox "Wrong Password Please check Password and Try again"
Me.TextBox1 = ""
Sheets("Instructions").Select
End Sub
--

just a early thank you whoever can help ???






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default code not working

Bob's point, and something for you to remember for future newsgroup
postings, saying "it does not work" tells us absolutely nothing about your
problem. You have to tell us what you thought was going to happen and what
actually happened instead; then we would have an idea of where to look in
order to help you. Think of it this way... you take your car in to your
service shop and tell the mechanic, "My car doesn't work right"... do you
think he will start right in fixing it, or might he want to know a little
more information first. We need additional information over and above "it
doesn't work" in the same way your mechanic would.

By the way, you didn't mention whether the missing "End If" was your problem
or not.

Rick


"Moh" wrote in message
...
you are one funny comedian errrrm not

anyway thank you for the help

much appreciated.

Cheers Ears
--



"Bob Phillips" wrote:

Does not work? What does it do, trash your PC, disappear up its own ...

There is a misusing End if at the end, but the compiler would tell you
that,
so some detail would help.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Moh" wrote in message
...
why does this code not work? ? ? or what have i missed out??

Private Sub CommandButton3_Click()
If Me.TextBox1.Value = 74987 Then
Worksheets("Bank View1").Activate
Unload Me
Else
MsgBox "Wrong Password Please check Password and Try again"
Me.TextBox1 = ""
Sheets("Instructions").Select
End Sub
--

just a early thank you whoever can help ???





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
Code not working NOW ? But it was before??? Corey Excel Programming 2 August 18th 06 03:30 AM
Help - Code not always working twperplex Excel Programming 1 August 4th 06 06:24 PM
Code not working GregR Excel Programming 9 July 26th 05 04:46 PM
Code not working Todd Huttenstine Excel Programming 1 June 10th 04 05:06 PM
Code not working Bob Phillips[_5_] Excel Programming 5 August 14th 03 03:12 PM


All times are GMT +1. The time now is 05:32 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"