VBA 使えるソースコード

つたないソースコードを載せます。これは、他人の書いたソースコードを読む練習に最適です。初心者の方は、どうしたらきれいになるかなど考えながら活用してください。

2020-01-29から1日間の記事一覧

VBA 測定単位を計算する(関数)

Function Unit(x() As Double) As Double()Dim i As IntegerDim n As IntegerDim a As IntegerDim m As DoubleDim j As IntegerDim x_k() As DoubleDim x_len As IntegerDim max As Double, min As Doublemax = x(1)min = x(1)x_len = UBound(x) For i = 1 T…

VBA お絵描きしてみよう

Sub Draw()Dim i As IntegerDim j As IntegerDim a As DoubleDim b As DoubleDim c As DoubleDim d As Double d = 350For j = 1 To 5 a = Rnd b = Rnd c = Rnd For i = 1 To 5 ActiveSheet.Shapes.AddShape(msoShapeOval, 82.8 + i * 100, 59.4 + j * 100, 9…

VBA 度数分布表を自動で作成(関数)

Function Bord(x() As Double) As Double()Dim i As IntegerDim a As Integer Dim b() As DoubleDim m As DoubleDim n As IntegerDim h As IntegerDim c As DoubleDim x_len As IntegerDim max As Double, min As Doublemax = x(1)min = x(1)x_len = UBound(…