3 Replies - 465 Views - Last Post: 09 April 2012 - 06:01 PM Rate Topic: -----

#1 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Procedure Problem

Posted 09 April 2012 - 05:29 PM

Ive a Procedure within my code for a program which calls for a messagebox to be displayed when a button is clicked.
But how to I stop this procedure from being called? As if some information is not entered correctly I do not want the procedure to be called.


My procedure is named
DisplayMessagebox()


ive tried this, but it wont run
DisplayMessagebox = False


Any Help?

Is This A Good Question/Topic? 0
  • +

Replies To: Procedure Problem

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5432
  • View blog
  • Posts: 11,644
  • Joined: 02-June 10

Re: Procedure Problem

Posted 09 April 2012 - 05:40 PM

There are more than 500,000 users on the DIC. Can you imagine if they all started threads as "Problem" ? Please use meaningful titles so the people with the most knowledge in your area are drawn to your question. This also helps people later using search engines to find they help they need.

try doing an 'if' check

if (someBooleanCondition) DisplayMessageBox()

Was This Post Helpful? 0
  • +
  • -

#3 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Re: Procedure Problem

Posted 09 April 2012 - 05:47 PM

That was the first thing which I tried but couldn't get it working, I thought there might have been some easier way to stop a procedure
Was This Post Helpful? 0
  • +
  • -

#4 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Re: Procedure Problem

Posted 09 April 2012 - 06:01 PM

Sorry for a double Post but since I cant Edit I have got this working
I just changed the location of the procedure to instead of under the button
Sorry for a waste of a thread
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1