VSCode VBA Snippets

VSCode VBA Snippets 2.8.0

分类:工具软件

版本:2.8.0

浏览:33

日期:06.05

探索VSCodeVBASnippets,专为VisualBasic开发者设计的代码片段集合,支持.vb、.brs、.vbs、.bas文件格式。通过简单设置,即可快速使用Dim、IfElse、Loops、Sub、Function等常用代码块,提升您的开发效率。

立即下载

VSCode VBA Snippets:提升Visual Basic开发效率的代码片段

在Visual Studio Code中,VBA Snippets为Visual Basic开发者提供了一套高效的代码片段工具,支持多种文件格式,包括.vb、.brs、.vbs和.bas。通过简单的设置,您可以快速访问并使用这些代码片段,极大地提升您的开发效率。

支持的语言和文件格式:

  • Visual Basic (".vb", ".brs", ".vbs", ".bas")

使用方法:

安装此代码片段后,请在您的设置中添加以下内容:

"editor.snippetSuggestions": "top",

代码片段概览:

基础代码

  • Dim
  • If Else
  • 循环
  • Sub
  • Function
  • Select Case
  • MsgBox

详细代码片段

Dim [Dim 声明]

Dim arr()
Dim bol As Boolean
Dim lng As Long
Dim dbl As Double
Dim str As String
Dim obj As Object
Private

If [If 代码块]

If condition Then

End If

IfElse [If Else 代码块]

If condition Then

Else

End If

IfElseIf [If ElseIf Else 代码块]

If condition1 Then

ElseIf condition2 Then

Else

End If

With [With 代码块]

With

End With

for [For Next 循环]

For i = lower To upper

Next i

ForEach [For Each]

For Each variable In collection

Next variable

DoLoopWhile [Do Loop While 代码块]

Do

Loop While condition

DoWhile [Do While 循环代码块]

Do While condition

Loop

While [While Wend 代码块]

While condition

Wend

Sub [Sub 代码块]

Private Sub func(input)
'
' descrip.
'
' @since 1.0.0
' @param {type} [name] descrip.
' @return {type} [name] descrip.
' @see dependencies
'



End Sub

Function [Function 代码块]

Private Function func(input)
'
' descrip.
'
' @since 1.0.0
' @param {type} [name] descrip.
' @return {type} [name] descrip.
' @see dependencies
'



End Function

SelectCase [Select Case 代码块]

Select Case test

  Case lists

    statements

  Case Else

    elseStatement

End Select

MsgBox [消息框代码块]

MsgBox "message", buttonType, "title"

Cells

Range(Cells(), Cells())

Range

Cells()

Worksheets

Worksheets("")

简短代码片段

UBound
LBound
To
Fix
Int
ReDim
Set
Call
Split
Preserve
Option Explicit
On Error Resume Next
ClearContents
Clear
Columns
Rows
CreateObject
IsEmpty

通过使用VSCode VBA Snippets,您可以更快地编写和调试Visual Basic代码,提高开发效率。

最新下载

更多 ›

相关文章

更多 ›

课程推荐

更多 ›
首页