you mean getting the content from the clip board and write to *.bat file at once?
If System.Windows.Forms.Clipboard.GetDataObject.GetDataPresent( _
System.Windows.Forms.DataFormats.Text) Then
Dim strBatfile as String
strBatfile = System.Windows.Forms.Clipboard.GetDataObject.GetData( _
System.Windows.Forms.DataFormats.Text)
End If
FileOpen(1, (Application.StartupPath & "\LogonHours.bat"), OpenMode.Output)
PrintLine(1, strBatFile)
FileClose(1)
Just have them all together in one Sub.