Unfortunately there is no way to do this built in. Looking at the C# snippet for switch, you can see that it performs a built-in function to get the case statements:
<Literal Editable="false">
<ID>cases</ID>
<Function>GenerateSwitchCases($expression$)</Function>
<Default>default:</Default>
</Literal>
However, the VB snippet, just defines a couple of Case Literals:
<Literal>
<ID>Case1</ID>
<Type></Type>
<ToolTip>Replace with a valid value of the expression.</ToolTip>
<Default>1</Default>
</Literal>
<Literal>
<ID>Case2</ID>
<Type></Type>
<ToolTip>Replace with another valid value of the expression.</ToolTip>
<Default>2</Default>
</Literal>
Unfortunately you cannot define custom functions to use inside the Snippets, so you are only left with the Default ones, and GenerateSwitchCases appears to not work in VB. That means that you cannot even define your own Select Case
snippet that will perform the same value.
I've tried using the below, but it just doesn't seem to want to perform the evaluation. In any case, I suspect we'd end up with :
at the end of every case (which is C# notation).
<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Select Case Statement</Title>
<Author>Microsoft Corporation</Author>
<Description>Inserts a Select Case statement.</Description>
<Shortcut>NewSelect</Shortcut>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Imports>
</Imports>
<Declarations>
<Literal>
<ID>expression</ID>
<ToolTip>Expression to switch on</ToolTip>
<Default>switch_on</Default>
</Literal>
<Literal Editable="false">
<ID>cases</ID>
<Function>GenerateSwitchCases($expression$)</Function>
<Default>Case Else</Default>
</Literal>
</Declarations>
<Code Language="VB" Kind="method body"><![CDATA[Select Case $expression$
$Cases$
End Select]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Checking out MSDN, you can see that there are only a couple of Snippet functions, and they are all C# only.