• 0

[VB] I need a "not like" statement


Question

haha, Ive been milkin you guys with all my VB problems today ;)

Alright so I have a check to make sure that the number entered is actully a #, it goes:

If min.Text Like "#" Then betch.Value = 1

thing is farther dow I want to have another check where if it detects anything but a number I want it to set betch.value to 0. So bascilly what Im looking for is a "not like" command or any workaround. Thanks, you guys have been of great help to me on this project of mine.

Link to comment
https://www.neowin.net/forum/topic/470938-vb-i-need-a-not-like-statement/
Share on other sites

6 answers to this question

Recommended Posts

  • 0

oh man, thank you. this forum has made me feel stupid multiple times now. argg!! :) seriously though thanks for that.

EDIT: hmm it works but not very well, if I cant figure out whats wrong in the next few minutes Ill post it up here.

EDIT: I figued it out, I needed the "Else betch.Value = 0" on both levels of my nested if.

EDIT: alright probelm # 2. I have this line of code:

 If hour.Text Like "#" Then
--long list of stuff down here but adventuly turns off something

problem is, as you may know, an hour can be 1 digit, or 2 digits. What Im looking for this time is like an

if hour.text like "#" or "##" then

kind of command, any ideas on this one?

If I dont get a response Ill make anew thread.

Edited by hobblyhoy
  • 0

Just put the isnumeric() in an if statement

I dont know if this is the exact syntax for VB because I havnt touched it in almost a year.

if isnumeric(textbox1.text) then

textbox2.text = "ITS A NUMBER!!!"

else

textbox2.text = "ITS NOT NUMBER!!! WHY NOT???"

end if

  • 0
  Quote
EDIT: alright probelm # 2. I have this line of code:

If hour.Text Like "#" Then

--long list of stuff down here but adventuly turns off something

problem is, as you may know, an hour can be 1 digit, or 2 digits. What Im looking for this time is like an

if hour.text like "#" or "##" then

kind of command, any ideas on this one?

If I dont get a response Ill make anew thread.

again ur right alredy :p

if hour.text like "#" or hour.text like "##" then

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Last I checked, their "support clock" runs for five years. So EOL at end of 2028 for this model? Roll your own looks better all the time. I do understand that's not for everyone. I think the least they could do is offer you six months of free cloud so you could migrate to new hardware when the time comes. Assuming you stick with them as your hardware vendor, of course.
    • Music Collection 3.9.1.1 by Razvan Serea Music Collection is a free tool to archive and manage your music library. Add CDs, LPs, tapes, or digital files manually or via the Internet. Retrieve album data by artist, title, barcode, catalog number, or CD scan. Auto-import metadata from audio files. Browse, sort, filter, export, import, and generate reports effortlessly. Music Collection features: The program creates the collection's database in a Microsoft Access format, so if you want later, you can use it, without the help of the program. The user can create as many as different collections wants. Accepts all kinds of musical media (cd, lp, dvd-a, audio files etc.). Specially customized to add and edit classical music albums. Retrieves data from the Internet, such as cd info, album cover, artist information, tracks, and the lyrics of each track etc. For every album the program saves all media contained, every medium tracks and the lyrics for every track. Displays albums using filters or the advanced search feature. Lists selected albums in a grid or using images (default setting). Presents all items contained in the album, in one page for an easy album overview. The details that are shown there are: album cover, album artists, notes, the tracks of each medium, the lyrics of each track and the duration of each one, as well as the total duration of the album. Exports album information to html file. Exports collection albums to html,txt,csv,excel files. Imports album information from text files exported by another program. Manages all program data, such as a list of singers, composers, etc. Manages artist information (biography, best albums). Prints all the data shown in each table.. Creates reports, which you can configure by your preference.. Manages album loans. Shows collection statistics. Searches for tracks and opens the album medium that contains them. Skinable. The user can select from 30 different skins. Multi-language support. Music Collection 3.9.1.1 changelog: Added: Show selected group item total duration. Added: Option to show only the checked albums. Added: Save the checked album property. Added: Play checked tracks. Fixed: Some minor bugs. Download: Music Collection 3.9.1.1 | 8.0 MB (Freeware) Download: Portable Music Collection 3.9.1.1 View: Music Collection Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Well, the interface is horrible. PST isn't fully functional. Can't properly import Thunderbird contacts into it. All that showed up are names.
    • "all the way down" by 33 whole dollars. Amazing. You shouldn't have.
    • If they make a portable version, I might give it a try, but I will always prefer hotkeys to that approach
  • Recent Achievements

    • Conversation Starter
      Kavin25 earned a badge
      Conversation Starter
    • One Month Later
      Leonard grant earned a badge
      One Month Later
    • Week One Done
      pcdoctorsnet earned a badge
      Week One Done
    • Rising Star
      Phillip0web went up a rank
      Rising Star
    • One Month Later
      Epaminombas earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      529
    2. 2
      ATLien_0
      207
    3. 3
      +FloatingFatMan
      168
    4. 4
      Michael Scrip
      150
    5. 5
      snowy owl
      124
  • Tell a friend

    Love Neowin? Tell a friend!