PDA

Click to See Complete Forum and Search --> : VB Executable


cwalshe
Jul 5th, 2001, 08:15 AM
Hi,

Can anyone tell me how to have a VB executable open automatically once the Save As dialog box is closed.

Also is there a way of 1) copying the file name from the Save As dialog box and inputting it into a text box on a different form and 2) how to set up a VB executable so that it sits in the systems tray when inactivate.

Thanks,

Cormac.

Megatron
Jul 5th, 2001, 08:30 AM
To open an EXE after the Save As dialog box is dismissed, just use the Shell statement after your ShowSave statement, e.g:

On Error Resume Next
CmDlg.CancelError = True
CmDlg.ShowSave
If Err <> 32755 Then
Shell "C:\MyApp.exe", 1
End If

To copy the filename, just assign it like you would normally do:

On Error Resume Next
CmDlg.CancelError = True
CmDlg.ShowSave
If Err <> 32755 Then
Form2.txtFileName = CmDlg.filename
End If

Megatron
Jul 5th, 2001, 08:34 AM
See this tip (http://www.vb-world.net/tips/tip61.html) for adding your program to the system tray.