Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

ChDrive Left(ActiveWorkbook.Path, 1)

0

Bonjour à tous,

J'ai le code suivant :

Sub consolider()

'

    ChDrive Left(ActiveWorkbook.Path, 1)

    ChDrive ActiveWorkbook.Path

    ChDir ActiveWorkbook.Path

    Set classeurMaitre = ActiveWorkbook

    ChDir ActiveWorkbook.Path

Etc.

ChDrive Left(ActiveWorkbook.Path, 1), j'obtiens l'erreur suivante : Périphérique non disponible.

Pouvez-vous m'aider à solutionner ce problème s.v.p. ?

Dan

Answer
Discuss

Discussion

I'm not certain that anyone speaks french here. If you translate your question to english it will be much easier to help. But, if you use ChDrive on a workbook that isn't saved, it won't return a path and maybe that is the issue.
don (rep: 1989) Sep 10, '20 at 4:59 am
Bonjour, merci pour votre commentaire. Mon classeur est enregistré sur un serveur qui se trouve dans un nuage. C'est peut-être ça le problème mais y a t'il une solution pour remédier à ca problème ? Il y a plusieurs mois, le tout fonctionnait correctement. Merci pour votre aide, Dan
Danpom (rep: 2) Sep 10, '20 at 6:23 am
Thank you Don,
The workbook is already saved on a hard network saved on a cloud.

I think it is th problem to fixe.

Dan
Danpom (rep: 2) Sep 10, '20 at 11:59 am
Yes that is definitely the problem then! I'm glad you were able to figure it out! If you can make a post that explains what you are trying to do, maybe there is another way to do it and we can try to help :)
don (rep: 1989) Sep 11, '20 at 3:19 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login