locked
The My.Computer.XXXX is not being recognized (error says My is not defined). RRS feed

  • Question

  • How do I get the system to recognize this Object?
    Friday, November 20, 2020 1:18 PM

All replies

  • Hello,

    What type of project is this, .NET Framework based form or class project or .NET Core form or class based project?

    Note for a .NET Framework form or class project My namespace is available unless you did something that fails (and that can be many things) to cause Visual Studio not to find My namespace and specifically My.Computer.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    My GitHub code samples
    GitHub page


    Friday, November 20, 2020 3:36 PM
  • I'm not in Visual Studio, just working in the internal VB editor.  I did check to see if the VB.Visual Basic.dll was available and it is.

    Friday, November 20, 2020 6:28 PM
  • Sorry, Microsoft.Visual Basic.dll

    Friday, November 20, 2020 6:29 PM
  • I'm not in Visual Studio, just working in the internal VB editor.  I did check to see if the VB.Visual Basic.dll was available and it is.

    I don't know what internal VB editor you are talking about.

    EDIT: If you are not in Visual Studio and that your project was not created in Visual Studio you are going to be missing a lot and not have My namespace.

    Internal editor feels like you are perhaps in Microsoft Access or perhaps Microsoft Excel as they have internal editors but don't work with My namespace so if that is the case you are out of luck and need to find assistance in a forum that supports whatever editor you are using.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    My GitHub code samples
    GitHub page


    Friday, November 20, 2020 6:34 PM
  • The editor that comes with VB.  It's where you can write code, create forms, etc.
    Friday, November 20, 2020 6:55 PM
  • Yes, I'm working in Excel.  Guess I have to find another way to accomplish this.
    Friday, November 20, 2020 7:03 PM
  • The editor that comes with VB.  It's where you can write code, create forms, etc.

    The only editor I know of that will allow My namespace is Visual Studio, you are out of luck otherwise as in whatever editor you are using. 

    NOTE: VB.NET does not come with an editor, VB.NET is a programming language and has no dedicated editor.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    My GitHub code samples
    GitHub page

    Friday, November 20, 2020 7:04 PM
  • Hi bnadler4648,

    I suggest you download Visual Studio and the latest version is Visual Studio 2019.

    Check the following document.

    Visual Studio documentation

    Best Regards,

    Xingyu Zhao


    Visual Basic and CLR forum will be migrating to a new home on Microsoft Q&A! (VB.NET and CLR) We invite you to post new questions in the new home on Microsoft Q&A ! For more information, please refer to the sticky post(VB.NET and CLR).

    Thursday, December 3, 2020 2:47 AM