Create a new data type : Type « Data Type « VBA / Excel / Access / Word






Create a new data type

 
Option Explicit

Type article
  artname As String
  price As Currency
End Type

Sub macro()
  Dim a As article, b As article
  a.artname = "Screw"
  a.price = 3.5
  b = a
  Debug.Print b.price
End Sub

 








Related examples in the same category

1.An Example of Using a Type Structure
2.Save type info to form
3.User-Defined Data Types