Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110236 > unrolled thread
| Started by | gary@gcisecurityinc.com |
|---|---|
| First post | 2017-08-29 06:33 -0700 |
| Last post | 2017-09-14 16:54 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to microsoft.public.excel.programming
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Error 58, file already exists - why? gary@gcisecurityinc.com - 2017-08-29 06:33 -0700
Re: Error 58, file already exists - why? Adrian Caspersz <email@here.invalid> - 2017-09-14 16:54 +0100
| From | gary@gcisecurityinc.com |
|---|---|
| Date | 2017-08-29 06:33 -0700 |
| Subject | Re: Error 58, file already exists - why? |
| Message-ID | <eac7a1cd-8416-4d9d-a3f7-6285d6251adb@googlegroups.com> |
On Monday, February 1, 2010 at 10:46:02 AM UTC-6, Rookie_User wrote:
> I am trying to move a file from one folder to another - or at least copy and
> delete the old file. I get an error 58 file already exists, and don't know
> why?
>
>
>
> Public Sub MoveFiles(ByVal Source As String, ByVal Destination As String)
> Dim oFSO As Object
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> With oFSO
> If .FileExists(Source) Then
> .MoveFile Source, Destination
> Else
> MsgBox Source & " Doesn't Exist", vbExclamation
> End If
> End With
> Set oFSO = Nothing
> End Sub
>
> Sub RunThroughList()
> Dim I As Long
> Dim Destination As String
> Dim Lastrow As Long
>
> Lastrow = Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row
>
> For I = 1 To Lastrow
> MoveFiles Range("A" & I).Value, "C:\Output"
>
> Next
> End Sub
[toc] | [next] | [standalone]
| From | Adrian Caspersz <email@here.invalid> |
|---|---|
| Date | 2017-09-14 16:54 +0100 |
| Message-ID | <f1vn2iF2ilaU1@mid.individual.net> |
| In reply to | #110236 |
On 29/08/17 14:33, gary@gcisecurityinc.com wrote: > On Monday, February 1, 2010 at 10:46:02 AM UTC-6, Rookie_User wrote: >> I am trying to move a file from one folder to another - or at least copy and >> delete the old file. I get an error 58 file already exists, and don't know >> why? Why dig up an answered post? Before anyone wastes time on this, read the thread. https://groups.google.com/forum/#!topic/microsoft.public.excel.programming/935qBX3KYyg -- Adrian C
[toc] | [prev] | [standalone]
Back to top | Article view | microsoft.public.excel.programming
csiph-web