Results 1 to 11 of 11

Thread: "tray" and "catch"

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Location
    Poland
    Posts
    10

    "tray" and "catch"

    Is there something similar like "try ... catch" in c++.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: "tray" and "catch"

    Moved to C++ Forum.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: "tray" and "catch"

    Quote Originally Posted by andrzej
    Is there something similar like "try ... catch" in c++.
    Yes! http://msdn.microsoft.com/library/de...statements.asp
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    New Member
    Join Date
    May 2005
    Posts
    11

    Re: "tray" and "catch"

    There is nothing like this in VB

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: "tray" and "catch"

    VB.NET has the same Try Catch and VB6 has On Error GoTo SomeErrorHandler.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: "tray" and "catch"

    I think moving this thread here was wrong. I think it was a question about VB, if it had a feature that the OP knew from C++.

    Can somebody move it back?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403

    Re: "tray" and "catch"

    Quote Originally Posted by CornedBee
    I think moving this thread here was wrong. I think it was a question about VB, if it had a feature that the OP knew from C++.

    Can somebody move it back?
    I could ... Although I'm still not sure if the original poster is asking if VB has a "try and catch" like in C++ or if C++ has a "try and catch" like in VB(.NET).
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: "tray" and "catch"

    I have to agree with CornedBee here. I said it to RobDog right after he moved it. I am pretty sure he means "AS in C++".



    ØØ

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Location
    Poland
    Posts
    10

    Re: "tray" and "catch"

    sorry, but I don't know why my question was moved to "C++ Forum". Probably it is my fault, beacuse of my poor english. I mean " try and catch AS IN C++". I am beginner in VB for Application.
    Sorry once again, unfortunatelly I don't know how to move this question back to VBA Forum.

    Thanks for your help

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: "tray" and "catch"

    Quote Originally Posted by andrzej
    Sorry once again, unfortunatelly I don't know how to move this question back to VBA Forum.
    You can't. Only moderators can do that.

    Anyway, thanks for the clarification, and I hope your question was answered.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: "tray" and "catch"

    My bad You know Mods can make a mistake only once a year so I guess I reached my quota for this year. If I make another
    one I may be banned.

    Only Sunburnt or a Supermod/Admin can move the thread, but the answer would be the On Error declaration.

    VB Code:
    1. Private Sub Command1_Click()
    2.    
    3.     On Error GoTo MyError
    4.  
    5.     'Create some error
    6.     MsgBox 1/0
    7.     Exit Sub
    8.  
    9. MyError:
    10.     If Err.Number = 11 Then
    11.         MsgBox "Can not divide by zero"
    12.     Else
    13.         MsgBox Err.Number & " - " & Err.Description, vbOkOnly + vbExclamation
    14.     End If
    15. End Sub
    Last edited by RobDog888; May 31st, 2005 at 11:04 AM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width