Difference between Win98 and XP

P

Peter

Hi

The following macro takes files that are in one directory, and puts them in a newly created directory. This works in Excel 2000 running on 98, but does not work in Excel 2000 running on XP
(I put a On Error goto line before the rename directory lines, and in XP it jumps and does not create the new directory. In 98 it creates the directory

(Before running this macro, there is a dir called "one" in the "oldname" directory.
I have heard that XP will not create a new diredtory this way
Can anyone tell me how to do this in XP

Thank you very muc

Sub xp98(

Dim OldName As Strin
Dim NewName As Strin
Dim myfolder As Strin

With ThisWorkboo
myfolder = ("one"

OldName = "C:\Fishbowl\Req_Serv\" & myfolde
NewName = "C:\Fishbowl\Solved_Service_Cases\" & myfolde
Name OldName As NewNam

End Wit

End Su
 
B

Bob Umlas, Excel MVP

IN XP, there are new paths, including Documents and Settings. Try typing this in the workbook in XP and you'll see the path is NOT "C:\Fishbowl\Req_Serv\" & myfolder, but a much longer path
=Cell("Filename"


----- Peter wrote: ----

Hi

The following macro takes files that are in one directory, and puts them in a newly created directory. This works in Excel 2000 running on 98, but does not work in Excel 2000 running on XP
(I put a On Error goto line before the rename directory lines, and in XP it jumps and does not create the new directory. In 98 it creates the directory

(Before running this macro, there is a dir called "one" in the "oldname" directory.
I have heard that XP will not create a new diredtory this way
Can anyone tell me how to do this in XP

Thank you very muc

Sub xp98(

Dim OldName As Strin
Dim NewName As Strin
Dim myfolder As Strin

With ThisWorkboo
myfolder = ("one"


OldName = "C:\Fishbowl\Req_Serv\" & myfolde
NewName = "C:\Fishbowl\Solved_Service_Cases\" & myfolde
Name OldName As NewNam

End Wit

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top