8

Sub start()

Load UserForm1

UserForm1.TextBox1.SetFocus

UserForm1.Show

End Sub

Private Sub CommandButton1_Click()

Dim i As Byte

Range("C4").Select

While Cells(4 + i, 3) <> ""

i = i + 1

Wend

Cells(4 + i, 3) = TextBox1

Cells(4 + i, 4) = TextBox2

Cells(4 + i, 5) = TextBox3

Cells(4 + i, 6) = TextBox4

End Sub

Private Sub CommandButton2_Click()

Dim nazwa As String, wiersz As String

Dim lw As Byte, licznik As Byte, i As Byte

nazwa = Application.GetOpenFilename

Open nazwa For Append As #1

While Cells(4 + i, 3) <> ""

wiersz = Cells(4 + i, 3).Text & ", " & Cells(4 + i, 4).Text & ", " & Cells(4 + i, 5).Text & ", " & Cells(4 + i, 6).Text

i = i + 1

Print #1, wiersz

Wend

Close #1

MsgBox ("Zapisano do pliku")

End Sub

Private Sub CommandButton3_Click()

TextBox1 = ""

TextBox2 = ""

TextBox3 = ""

TextBox4 = ""

TextBox1.SetFocus

End Sub

Private Sub CommandButton4_Click()

UserForm1.Hide

Unload UserForm1

End Sub


Wyszukiwarka

Podobne podstrony:
8
8
8
8
8
8
116 8, układy cyfrowe
8
8
8
8
8
8
8
8
8
8

więcej podobnych podstron