?
Solved

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

Posted on 2003-03-02
5
Medium Priority
?
126 Views
Last Modified: 2010-05-01
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
0
Comment
Question by:TJ2002
  • 3
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 200 total points
ID: 8051843
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

End Sub
0
 

Author Comment

by:TJ2002
ID: 8051878
Thanx....!...It's working.....

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


ThnX,
TJ2002
0
 

Author Comment

by:TJ2002
ID: 8051924
Thanx....!...It's working.....

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


ThnX,
TJ2002
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 8051979
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
0
 

Author Comment

by:TJ2002
ID: 8052015
thanx again vinnyd79

GreetZ, TJ2002
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question