Link to home
Start Free TrialLog in
Avatar of TJ2002
TJ2002

asked on

Moving SelectedFile (images) to a directory HELP....

I am looking for a code to move a image that is selected in a FileListBox (see code) and printed in a Image field

*******
Private Sub File1_Click()
    SelectedFile = File1.Path & "\" & File1.FileName
    Image1.Picture = LoadPicture(SelectedFile)
End Sub
*************

i want move the images whit an command button.


ThnX, TJ2002
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TJ2002
TJ2002

ASKER

Thanx....!...It's working.....

but is it also posible to refresh the FileListBox after the moving command???


ThnX,
TJ2002
Avatar of TJ2002

ASKER

Thanx....!...It's working.....

but is it also posible to refresh the FileListBox after the moving command???


ThnX,
TJ2002
sure,just add File1.Refresh after Moving

Private Sub Command1_Click()
Dim SelectedFile As String
Dim Destination As String
SelectedFile = File1.Path & "\" & File1.FileName
Destination = "C:\SomeDir\" & File1.FileName

Name SelectedFile As Destination

File1.Refresh
End Sub
Avatar of TJ2002

ASKER

thanx again vinnyd79

GreetZ, TJ2002