1 Replies - 138 Views - Last Post: 15 June 2012 - 05:29 PM Rate Topic: -----

#1 vnewbie  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 71
  • Joined: 28-April 12

Validation on my coding

Posted 15 June 2012 - 05:18 PM

Hi,

I have a newbie question hopefully the more experienced vb heads will be able to help me with, I have a command button which works like the following

'Command button coding

'Code 1
messagebox.show("ok")

'Code 2
messagebox.show("ok")

'Code 3
messagebox.show("ok")

'Code 4



I was thinking would it be possible to only run 'Code 4 if the messagebox.show has not appeared for Code 1, Code 2 and Code3?

Is This A Good Question/Topic? 0
  • +

Replies To: Validation on my coding

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 6438
  • View blog
  • Posts: 23,432
  • Joined: 12-June 08

Re: Validation on my coding

Posted 15 June 2012 - 05:29 PM

I am not sure what sort of validation you are doing, but sure.. I guess if you chuck in a boolean called 'bError' and if the validation fails turn it on.. and then wrap code 4 in an 'if' statement only allowing the code to be completed if berror is not true
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1