Results 1 to 8 of 8

Thread: [RESOLVED] BC30001: Statement is not valid in a namespace

  1. #1

    Thread Starter
    Junior Member MadLadDesigns's Avatar
    Join Date
    Feb 2025
    Location
    UK
    Posts
    28

    [RESOLVED] BC30001: Statement is not valid in a namespace

    I've obviously done something wrong, as I'm now getting these errors:

    Name:  Not Valid.jpg
Views: 278
Size:  43.8 KB

    How do I correct this please?
    Last edited by MadLadDesigns; Mar 12th, 2025 at 06:39 AM. Reason: [RESOLVED]
    Andy
    [MadLad Designs]

  2. #2

    Thread Starter
    Junior Member MadLadDesigns's Avatar
    Join Date
    Feb 2025
    Location
    UK
    Posts
    28

    Re: BC30001: Statement is not valid in a namespace

    It was because I was missing the 'Public Class Form1' at the beginning (Doh!)
    Andy
    [MadLad Designs]

  3. #3
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,354

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    FYI - It's a bad idea to post a picture of your code. It hard to read, at best. Always cut/paste your code, Use the code tags ("#") so the code keeps it's formatting.

  4. #4

    Thread Starter
    Junior Member MadLadDesigns's Avatar
    Join Date
    Feb 2025
    Location
    UK
    Posts
    28

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    Quote Originally Posted by wes4dbt View Post
    FYI - It's a bad idea to post a picture of your code. It hard to read, at best. Always cut/paste your code, Use the code tags ("#") so the code keeps it's formatting.
    The reason I did a screenshot was to highlight the errors, a simple cut and paste would have just shown the code. The code wasn't the problem.
    Andy
    [MadLad Designs]

  5. #5
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,354

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    Quote Originally Posted by MadLadDesigns View Post
    The reason I did a screenshot was to highlight the errors, a simple cut and paste would have just shown the code. The code wasn't the problem.
    You can't read the errors either. lol

  6. #6

    Thread Starter
    Junior Member MadLadDesigns's Avatar
    Join Date
    Feb 2025
    Location
    UK
    Posts
    28

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    Yeah, point taken. Lol!
    Andy
    [MadLad Designs]

  7. #7
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,354

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    You can cut/paste the errors too, usually. Just use the Quote tab for that.

  8. #8
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,002

    Re: [RESOLVED] BC30001: Statement is not valid in a namespace

    Quote Originally Posted by MadLadDesigns View Post
    The code wasn't the problem.
    Except it was. You can include a screenshot if it adds value, e.g. you might want to show the lines of code that are underlined as being in error, but always post text as text, formatted appropriately. That means code, error messages, etc. Apart from readability, if we want to run your code for ourselves or search the web for an error message, we can't copy and paste the text from a picture.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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