<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic converting vba to .net in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352881#M9273</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am sure many of you are in the same boat:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am just starting to try to convert my vba code to .net. I have begun with a very simple routine that basically just adds a start and end point to a route features we frequently make here at work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having a difficult time figuring out what to do when things are labeled undeclared or undefined in Visual Studio.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example here is a piece of the code below that defines the start point text and alignment. I have put the Visual Studio errors in the comments to the right of the variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp; '+++ Define the START Text Symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pTextSymbol As ITextSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol = New TextSymbol


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.HorizontalAlignment = esriTHARight 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.VerticalAlignment = esriTVABottom 'not declared
 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'FONT/SIZE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFont As IFontDisp 'not defined
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont = New StdFont 'not defined
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.Name = Arial 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.size = 18
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.Bold = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.Font = myFont 'Reference required to assembly blahblah

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'COLOR
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRGBColor As IRgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor = New RgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Red = 163
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Green = 255
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Blue = 115
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.Color = pRGBColor

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'HALO
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMask As IMask
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask = pTextSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask.MaskStyle = esriMSHalo 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask.MaskSize = 0.5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol = pMask
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone could help me to figure out how to redefine and redeclare these things so they would work in Visual Studio I would be very appreciative. There seems to be very little documentation regarding this topics like this anywhere on the interent currently but hopefully I am just missing something obvious and one of you can get me started down the right path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Jan 2011 17:19:22 GMT</pubDate>
    <dc:creator>maxsteinbrenner</dc:creator>
    <dc:date>2011-01-24T17:19:22Z</dc:date>
    <item>
      <title>converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352881#M9273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am sure many of you are in the same boat:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am just starting to try to convert my vba code to .net. I have begun with a very simple routine that basically just adds a start and end point to a route features we frequently make here at work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having a difficult time figuring out what to do when things are labeled undeclared or undefined in Visual Studio.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example here is a piece of the code below that defines the start point text and alignment. I have put the Visual Studio errors in the comments to the right of the variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp; '+++ Define the START Text Symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pTextSymbol As ITextSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol = New TextSymbol


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.HorizontalAlignment = esriTHARight 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.VerticalAlignment = esriTVABottom 'not declared
 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'FONT/SIZE
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myFont As IFontDisp 'not defined
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont = New StdFont 'not defined
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.Name = Arial 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.size = 18
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFont.Bold = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.Font = myFont 'Reference required to assembly blahblah

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'COLOR
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRGBColor As IRgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor = New RgbColor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Red = 163
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Green = 255
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRGBColor.Blue = 115
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol.Color = pRGBColor

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'HALO
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMask As IMask
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask = pTextSymbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask.MaskStyle = esriMSHalo 'not declared
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMask.MaskSize = 0.5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pTextSymbol = pMask
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone could help me to figure out how to redefine and redeclare these things so they would work in Visual Studio I would be very appreciative. There seems to be very little documentation regarding this topics like this anywhere on the interent currently but hopefully I am just missing something obvious and one of you can get me started down the right path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 17:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352881#M9273</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2011-01-24T17:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352882#M9274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the Horizonal and vertical alignment, the esriTHARight should begin with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;esriTextHorizontalAlignment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so it would be &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esriTextHorizontalAlignment.esriTHARight&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure the proper assemblies are loaded.&amp;nbsp; If an interface is not recognized by the Visual Studio, it usually means it isn't added as a reference.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Refer to this link for help with the IFontDisp stuff:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/NET/ca849e1d-5da3-4b64-90da-7a0cad7804f5.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/NET/ca849e1d-5da3-4b64-90da-7a0cad7804f5.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the esriMSHALO you need to import the ESRI.ArcGIS.Display assembly into your project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a constant in esriMarkStyle category.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So the code would be &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esriMarkStyle.esriMSHalo&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other than that, you need to seek out documentation on how to migrate from VBA to VB.NET (Visual Studio).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 17:45:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352882#M9274</guid>
      <dc:creator>RuchiraWelikala</dc:creator>
      <dc:date>2011-01-24T17:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352883#M9275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As mentioned in a prior post, you need references to assemblies. And to use types without full qualification, you need to "use" the correct namespaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I put together a little tutorial on converting VBA to a C# Add-in. Since you are working in VB.net, it is a little different. But this particular short video may give you a shortcut for adding assemblies in Visual Studio as you convert your code using the Object Browser (I assume it functions the same when using VB.net):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.qtools.com/tutorials/vba_to_cs/video/CS2008_ConvertVBA_Demo_pt03.swf.html"&gt;http://gis.qtools.com/tutorials/vba_to_cs/video/CS2008_ConvertVBA_Demo_pt03.swf.html&lt;/A&gt;&lt;SPAN&gt; (1 minute flash video)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The full tutorial is here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.qtools.com/blog/tutorials/vba-to-c-add-in/"&gt;http://gis.qtools.com/blog/tutorials/vba-to-c-add-in/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 18:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352883#M9275</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2011-01-24T18:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352884#M9276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Other than that, you need to seek out documentation on how to migrate from VBA to VB.NET (Visual Studio).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the pointers. i do have the ESRI.ArcGIS.Display assembly loaded, that took care of ITextSymbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you have any pointers on the type of documentation you describe i'd appreciate it. coming from VBA where you find code snippets already written to do pretty much anything GIS related, the transition to vb.net is pretty harsh so far.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 18:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352884#M9276</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2011-01-24T18:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352885#M9277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well the main thing is "hooking" the ArcMap document or the Application so you can work with the current document.&amp;nbsp; In VBA, this is done by "ThisDocument".&amp;nbsp; In VB.NET, ESRI has set up neat little snippets to grab the document from the application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Refer to this link for Snippet Help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/NET/040b30ea-16e1-4dee-af9d-e2157c7d4ddb.htm"&gt;http://edndoc.esri.com/arcobjects/9.2/NET/040b30ea-16e1-4dee-af9d-e2157c7d4ddb.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is an index of all the snippets available to you through the VS (Visual Studio) interface:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/snippetreference.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/snippetreference.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For other information, refer to this link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/concepts_start.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/concepts_start.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jan 2011 19:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352885#M9277</guid>
      <dc:creator>RuchiraWelikala</dc:creator>
      <dc:date>2011-01-24T19:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352886#M9278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;As mentioned in a prior post, you need references to assemblies. And to use types without full qualification, you need to "use" the correct namespaces.&lt;BR /&gt;&lt;BR /&gt;I put together a little tutorial on converting VBA to a C# Add-in. Since you are working in VB.net, it is a little different. But this particular short video may give you a shortcut for adding assemblies in Visual Studio as you convert your code using the Object Browser (I assume it functions the same when using VB.net):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.qtools.com/tutorials/vba_to_cs/video/CS2008_ConvertVBA_Demo_pt03.swf.html"&gt;http://gis.qtools.com/tutorials/vba_to_cs/video/CS2008_ConvertVBA_Demo_pt03.swf.html&lt;/A&gt; (1 minute flash video)&lt;BR /&gt;&lt;BR /&gt;The full tutorial is here:&lt;BR /&gt;&lt;A href="http://gis.qtools.com/blog/tutorials/vba-to-c-add-in/"&gt;http://gis.qtools.com/blog/tutorials/vba-to-c-add-in/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Jeff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A great tutorial site you have, thanks from all of us!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was following your tutorial for adding a toolbar (I have never attempted that before) and I came across an error on my system I was hoping you could help me with. One caveat, I am using VB, not C#. I am assuming it is the same (although I could be wrong). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I attempt step #4, Add --&amp;gt; New Item, and then select 'Add-in component', I get the error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Invalid ArcGIS Add-In Project. Unable to resolve the Add-in host from the configuration xml file."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you ever seen that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help, it is much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 19:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352886#M9278</guid>
      <dc:creator>TomGiles</dc:creator>
      <dc:date>2011-02-14T19:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352887#M9279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tom,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not encountered that error before. I also assume the steps would be the same for a VB.NET project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prior to attempting to add the toolbar, did you create an ArcMap Add-In project with a single button?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the error message, it might help if you paste the contents of the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Config.esriaddinx&lt;/SPAN&gt;&lt;SPAN&gt; file here so we can take a look at it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 20:45:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352887#M9279</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2011-02-14T20:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352888#M9280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;that is a great tutorial!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;even though i am using .net most of the setup techniques you show are idenitcal between both languages. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 15:38:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352888#M9280</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2011-02-16T15:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: converting vba to .net</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352889#M9281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to do the same thing as in the code posted at the start of this thread in .net.&amp;nbsp; I am getting an error on the line pMask.MaskStyle = esriMaskStyle.esriMSHalo.&amp;nbsp; The error I get is 'Object variable or With block variable not set' and this on the first part of the line (pMask.MaskStyle). pMask has been declared and set.&amp;nbsp; Any ideas on how I resolve this error?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 11:35:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/converting-vba-to-net/m-p/352889#M9281</guid>
      <dc:creator>AliceShepherd</dc:creator>
      <dc:date>2012-04-18T11:35:31Z</dc:date>
    </item>
  </channel>
</rss>

