Microsoft Visual Basic 6.0 Source Code
Save&RunBatFile

Option Explicit
Dim fileName As String
Dim ff As Integer
Private Declare Sub Sleep Lib "kernel32" (ByVal dvMilliseconds As Long)
Private Sub Command1_Click()
fileName = App.Path & "\ Temp$.bat"
ff = FreeFile
Open fileName For Output As #ff
Print #ff, "cmd.exe "
Close ff
Shell fileName, vbNormalFocus
Call RemoveTempBat
End Sub
Sub RemoveTempBat()
Sleep 1000
Kill fileName
End Sub
---------------------

Long Beep

Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Form_Activate()
Beep 500, 1000
End Sub
---------------------

ReName A File

Private Sub Command1_Click()
Dim DrFoFile, DrFoFileNew
DrFoFile = "C:\Windows\Temp\test.txt" 'To The Path And Filename For The File That You Want To Rename
DrFoFileNew = "C:\Windows\Temp\testnew.txt" 'Path And Filename For The New File Name
'DrFoFileNew = "testnew.txt" ' Or Filename only For The New File Name In The Folder You Run From
Name DrFoFile As DrFoFileNew
End Sub
---------------------