?
Solved

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

Posted on 2003-03-02
5
Medium Priority
?
125 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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

764 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