Código:
Private Sub Command3_Click()
On Error Resume Next
Dim KWorm As String
Dim i As Long
If Text1.Text = "" Then
MsgBox "No hay nada que Generar!", vbCritical, "Worm Kreator 1.0 [error]"
Else
On Error GoTo Cancel
CD1.FileName = "Worm.vbs"
CD1.Filter = "Archivos vbs |*.vbs"
CD1.ShowSave
Open CD1.FileName For Output As #1
Print #1, Text1.Text + vbCrLf
Close #1
PB1.Visible = True
For i = PB1.Min To PB1.Max
PB1.Value = i
Next i
MsgBox "Worm Generado con Exito", vbInformation, "Worm Kreator 1.0 [Done]"
PB1.Visible = False
End If
Cancel:
If Error = 32755 Then
PB1.Visible = False
End If
End Sub
Gracias