4 Replies - 534 Views - Last Post: 10 June 2013 - 08:29 PM Rate Topic: -----

#1 lazy.boss  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-June 13

could any help me to say what does this function does

Posted 08 June 2013 - 12:37 AM

Public Function GetIt(Code As String)
Dim X As String
Dim Y As String
X = Code
If X = "429" Or X = "22" Or X = "21" Or X = "20" Or X = "19" Or X = "18" Or X = "17" Or X = "435" Or X = "431" Then Y = "22"
If X = "1" Or X = "2" Or X = "3" Or X = "4" Or X = "5" Then Y = "23"
If X = "79" Or X = "80" Or X = "81" Or X = "449" Or X = "451" Then Y = "24"
If X = "74" Or X = "75" Or X = "132" Or X = "133" Or X = "134" Or X = "136" Or X = "138" Or X = "140" Or X = "68" Or X = "69" Or X = "70" Or X = "71" Or X = "72" Or X = "73" Then Y = "25"
If X = "76" Or X = "77" Or X = "78" Or X = "443" Or X = "445" Then Y = "26"
If X = "89" Or X = "90" Or X = "97" Or X = "98" Then Y = "9"
If X = "82" Or X = "83" Or X = "222" Or X = "224" Then Y = "13"
If X = "93" Or X = "94" Or X = "95" Then Y = "16"
If X = "85" Or X = "86" Or X = "87" Or X = "562" Or X = "576" Or X = "577" Or X = "578" Then Y = "18"
If X = "706" Or X = "718" Or X = "719" Or X = "720" Or X = "721" Or X = "722" Or X = "723" Or X = "724" Then Y = "42"
GetIt = Y
End Function



I am just confused . I am new in vb6

This post has been edited by JackOfAllTrades: 08 June 2013 - 03:27 AM
Reason for edit:: Added code tags


Is This A Good Question/Topic? 0
  • +

Replies To: could any help me to say what does this function does

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6107
  • View blog
  • Posts: 23,663
  • Joined: 23-August 08

Re: could any help me to say what does this function does

Posted 08 June 2013 - 03:31 AM

It's a really ugly function that compares the Code value that's passed into the function (and uselessly assigned to X) to a bunch of other values, sets Y to a value based on that determination and returns Y to the caller.
Was This Post Helpful? 0
  • +
  • -

#3 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

Re: could any help me to say what does this function does

Posted 08 June 2013 - 06:34 AM

i belive this is a computer crime >_<
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9574
  • View blog
  • Posts: 36,262
  • Joined: 12-June 08

Re: could any help me to say what does this function does

Posted 08 June 2013 - 07:10 AM

What do you mean neku ?
Was This Post Helpful? 0
  • +
  • -

#5 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: could any help me to say what does this function does

Posted 10 June 2013 - 08:29 PM

This function shows why VB6 has a bad name. That's what it does. Seriously, this would be much more neatly done using Select Case.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1